SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot JordanTLClive's Avatar
    Join Date
    Feb 2001
    Location
    Las Vegas, NV
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im having some trouble with imagemagick... Im writing a photo gallery script for one of my websites and the following code was working and I dont know why it isnt anymore. It should upload the file, create a overlay label that says hotmusicstars.com, then create a thumbnail file, and resize it to apx 50x50... does anyone see what is wrong with it?

    Code:
    $fullpath = $path . $savedir . "/" . $cat . "/" . $newname;
    	$dir = $path . $savedir . "/" . $cat;
    	$fullpathtn = $path . $savedir . "/" . $cat . "/tn_" . $newname;
    	$webpath = $savedir . "/" . $cat . "/" . $newname;
    	$webpathtn =  $savedir . "/" . $cat . "/tn_" . $newname;
    
    	if (!is_dir($dir)) {
    		mkdir("$dir", 0777);
    	}
    	copy($myfile, $fullpath) or die("Couldnt copy the file");
    	exec("mogrify -label hotmusicstars.com $fullpath");
    	copy($fullpath, $fullpathtn) or die("Couldnt copy the file");
    	exec("mogrify -geometry 50x50> $fullpathtn");
    
    	echo "<a href=\"$webpath\"><img src=\"$webpathtn\"></a>";
    -Jordan

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shouldn't

    PHP Code:
        exec("mogrify -geometry 50x50> $fullpathtn"); 
    be

    PHP Code:
        exec("mogrify -geometry 50x50! $fullpathtn"); 
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Zealot JordanTLClive's Avatar
    Join Date
    Feb 2001
    Location
    Las Vegas, NV
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No 50x50! would set the dimensions to exactly 50x50. What I want to do is 100x100 while maintaining aspect ratio which would be 100x100. the 100x100> would make it so its only resized if the images is greater than those dimensions originally.
    -Jordan


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •