Page 1 of 1

Optimal way to process jpegs

Posted: 2013-10-23T08:48:51-07:00
by holden
Processing jpegs is of course lossy, so I was thinking of converting the jpeg to IM's format (mif?), doing the operations, then saving as a jpeg- the worked mif would be discarded. Does this sound like a smart thing to do? And if so what is the best way to code it? Also the original image could be tif, png, psd, gif- mostly jpegs though. The operations include resize, rotate, crop, profile, autolevel, sharpen, composite.Thanks

Re: Optimal way to process jpegs

Posted: 2013-10-23T09:46:19-07:00
by snibgo
Strictly speaking, the losses occur when saving as jpeg. If your processing involves saving and reading temporary intermediate results, yes, a lossless format gives best quality. Miff is usually the fastest to read and write.

Re: Optimal way to process jpegs

Posted: 2013-10-23T09:53:21-07:00
by fmw42
If your commands are all in one command line, IM is using MIFF internally already between steps, so you save nothing by saving to MIFF on disk. As snibgo says, the losses occur when saving to jpg.

Re: Optimal way to process jpegs

Posted: 2013-10-23T09:58:40-07:00
by holden
Interesting- I can use tiff as the final file in my workflow, perhaps saving to tiff would be the best route then.

Re: Optimal way to process jpegs

Posted: 2013-10-23T10:00:09-07:00
by fmw42
Perhaps, but you may not be able to compress it to as small a size as jpg. Similarly you could use PNG for your output. So make the files smaller you could convert to 8-bit color (-type palette or -colors 256) or for png (PNG8:image.png)

Re: Optimal way to process jpegs

Posted: 2013-10-23T10:05:34-07:00
by holden
Thanks fmw, I'll do some testing to see if it's worth the hassle to use a different file format- the final image is going to print and will get deleted eventually so file size may not be an issue.

Re: Optimal way to process jpegs

Posted: 2013-10-23T10:19:34-07:00
by snibgo
Tiff has a number of compression options, including jpeg (which is lossy) and zip (lossless). I generally find that zip gives me the smallest lossless 16-bit compression.

I use jpeg only when I really have to. If one of your processing steps is to send the image to a printer, does lossy 8-bit jpeg give you any advantages? I doubt it. However, the difference in quality may not be noticable.

Re: Optimal way to process jpegs

Posted: 2013-10-23T10:38:41-07:00
by holden
snibgo wrote:I use jpeg only when I really have to. If one of your processing steps is to send the image to a printer, does lossy 8-bit jpeg give you any advantages? I doubt it. However, the difference in quality may not be noticable.
I'm not sure if the machines will handle a zipped tiff, or even 16-bit images, as our current print management software doesn't so it hasn't been tested extensively, something that is now on my todo list. I'll have to research the complexities of tiff as well, I know it has a ton of options at save time.