Page 1 of 1

PAID: Automatic ImageMagic JPEG Crop and Enhancement

Posted: 2017-06-17T20:34:33-07:00
by luter
Hello,

I'm needed php script for automatic image border crop and enhancement via ImageMagic for Free Bsd or CentOs or any linux servers.

Re: PAID: Automatic ImageMagic JPEG Crop and Enhancement

Posted: 2017-06-17T22:21:27-07:00
by fmw42
try this code in command line mode on your sample 2.

Code: Select all

convert 52.jpg -fuzz 10% -trim +repage -resize 320x180 -auto-level -auto-gamma test.jpg
You can call this command from PHP exec(). Sorry I do not know PHP Imagick.

Re: PAID: Automatic ImageMagic JPEG Crop and Enhancement

Posted: 2017-06-17T22:55:38-07:00
by fmw42
P.S. You should also test your jpg to be sure it is sRGB and has an sRGB profile. If not, then you need to convert from CMYK to sRGB with profiles before any other processing, since most of the commands may not work properly on CMYK images.

Re: PAID: Automatic ImageMagic JPEG Crop and Enhancement

Posted: 2017-06-18T01:42:40-07:00
by Bonzo
Image 1 is not the correct ratio and will need cropping; how do you know where to crop?

Looks like Imagick does not have an auto gamma if you want to go down that route.

Re: PAID: Automatic ImageMagic JPEG Crop and Enhancement

Posted: 2017-06-18T03:54:06-07:00
by luter
fmw42, I have php coders and I need algorithm in any programming language for crop and enhance any images from my archive.
I mean needed batch processing with variables instead filenames, because with these algorithms I'll work with millions images.
Batch must testing images in auto mode and use needed ImageMagic filters.

Bonzo, needed resize with aspect ratio first for one side and crop in 320x180 size.

Re: PAID: Automatic ImageMagic JPEG Crop and Enhancement

Posted: 2017-06-18T12:33:49-07:00
by fmw42
luter wrote: 2017-06-18T03:54:06-07:00 fmw42, I have php coders and I need algorithm in any programming language for crop and enhance any images from my archive.
I mean needed batch processing with variables instead filenames, because with these algorithms I'll work with millions images.
Batch must testing images in auto mode and use needed ImageMagic filters.

Bonzo, needed resize with aspect ratio first for one side and crop in 320x180 size.
If the aspect ratio of the cropped image, does not match 320x180, the resulting image may be 320 x some smaller amount, which would need padding to 320x180. Or you can resize to some large size than 320 x180 and then center crop to get exactly 320x180. What do you want to do in that regard.

Please see my PM to you on this forum's email system.