Jpeg extraction processing

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
agfaRanger
Posts: 2
Joined: 2018-03-09T09:03:54-07:00
Authentication code: 1152

Jpeg extraction processing

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Jpeg extraction processing

Post 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.
snibgo's IM pages: im.snibgo.com
agfaRanger
Posts: 2
Joined: 2018-03-09T09:03:54-07:00
Authentication code: 1152

Re: Jpeg extraction processing

Post by agfaRanger »

thank you. this helps significantly in the design of the process I am considering here.
Post Reply