Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Imagemagick is working, but commands are not  (Read 2695 times)

0 Members and 1 Guest are viewing this topic.

sunshinebrian

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Imagemagick is working, but commands are not
« on: February 22, 2006, 06:02:20 am »

Hi guys, I've googled everywhere for an answer to this but cannot find anything so if somebody could help me out here, I'd be ever so appreciative!  :)

So, I installed Coppermine and found my Imagemagick path. I tried out the commands -flip and -flop to see if the magick was indeed working correctly and sure enough, when I batch added files they were upside down and mirrored.

Now, what I want to do though is for Image Magick to automatically crop all the thumbnails so they're the same dimensions (70x100) without losing aspect ratio. I thought the crop command would do it so I tried combinations of:
Code: [Select]
-crop 70x100
-crop 70x100+0+0
-gravity center -crop 70x100+0+0

However, this yielded the following error when uploading the images:
Code: [Select]
Error executing ImageMagick - Return value: 1
Could somebody help me out on how to change the command so it will work? Or if coppermine even supports cropping thumbails?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Imagemagick is working, but commands are not
« Reply #1 on: February 26, 2006, 09:14:10 am »

don't use the ImageMagick options box in config... this will affect all images (thumbs, normal and fullsize if you autoresize them). Maybe useful to sharpoen images but this has downsides as well.

To crop thumbs you need to calculate a lot of stuff (and it's dependig on width/hight) --> in the end you have a formula like (example)
Code: [Select]
-crop ".$thb_width."x".$thb_height."+0+".round(($resized_h - $thb_height)/2 (for $srcWidth/$srcHeight < $thb_width/$thb_height)
still that's not the end of things. You need to implement that into the upload, batch add process then you need to add new calculations for the img tag. Cause coppermine doesn't support this out of the box you need to add new code at various places.

For more info have a look at the mods board. CHeck my modpack threads. They deal with this too and especially for thumb cropping /sharpening read the better thumbs thread
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.