Page 1 of 1

Jpeg extraction processing

Posted: 2018-03-09T09:28:48-07:00
by agfaRanger
Hi there;
I am in the initial stages of designing the work-flow for a particular photography archive
project. Most of processing will be done on 64-bit Linux Mint with ImageMagick 6.8.9-9

I searched the IM online documentation, and was unable to find the answer to the
following:

When a sub-image is extracted form a section of larger .jpeg image, for instance
convert -extract X,Y,X0,Y0 source.jpg target.jpg
(where the source.jpg size is significantly larger than XxY),
will the sub-frame be de-compressed and re-compressed, or will the extraction be done
of original compressed sub-line and written to the output .jpg without change?

Does this depend on the sub-frame being aligned with a specific (for instance,4-pixel)
even alignment within the original image?

How about other commands when they operate on .jpeg's, for instance "crop"?
Is this topic addressed anywhere in the documentation and did I miss it?

TIA

Re: Jpeg extraction processing

Posted: 2018-03-09T09:58:16-07:00
by snibgo
agfaRanger wrote:... will the sub-frame be de-compressed and re-compressed?
Yes.

IM reads the file of whatever format, decompressing and creating an image in memory. Then it processes that image. Then it writes the file, in whatever format, compressed as required.

IM is a general-purpose raster image processor, and its processing is blind to the file formats. Some specialist programs (eg jpegtrans) operate with knowledge of JPEG internals.

Re: Jpeg extraction processing

Posted: 2018-03-09T10:21:46-07:00
by agfaRanger
thank you. this helps significantly in the design of the process I am considering here.