Hey,
My use of the -crop command requires an image's quality to be maintained, but -crop seems to lose quality.
For example, "convert input_file -crop input_widthxinput_height+0+0 output_file" (where input_width and input_height are the input_file's width and height)
which effectively does nothing, reduces the quality for all file formats (jpg 1.51MB -> 1.26MB, png even worse).
Is there any way to avoid this compression? Or is it not an issue in later versions? (regardless, I'm unable to update the version on the server, so a workaround is preferable).
Version 6.6.4-0 Q16 Windows 7 64-bit
Thanks for you help.
-crop command quality loss
Re: -crop command quality loss
jpeg is lossy- open>do an operation>save will degrade them. Not a good working format. I'm not sure what IM's default compression is, but you can make it highest quality with -quality 100% http://www.imagemagick.org/Usage/formats/#jpg
I'm curious if the png is actually degraded or if IM just saves it smaller by default. PNG is not lossy (or at least not nearly as much).
I'm curious if the png is actually degraded or if IM just saves it smaller by default. PNG is not lossy (or at least not nearly as much).
Re: -crop command quality loss
That clears a lot up - link is pretty helpful, cheers. Looks like jpegtran would do the job - I've used it before, but I'm not sure if using it would be possible on my shared hosting.
Do you know if PHP's GD cropping methods are lossless or lossy?
Do you know if PHP's GD cropping methods are lossless or lossy?
Re: -crop command quality loss
Not sure, but in most programs jpeg handling is lossy atm. I've never used that particular method personally.Pinch wrote:Do you know if PHP's GD cropping methods are lossless or lossy?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: -crop command quality loss
Png shouldn't be lossy at all. If the image changes, it's probably a bug, so please post an example. The file size may change, depending on the compression method. But this shouldn't change the image at all.
snibgo's IM pages: im.snibgo.com
Re: -crop command quality loss
Maybe you are losing metadata not quaility. Try "identify -verbose" on the input and output files
to see if that tells you anythng.
to see if that tells you anythng.