Status of the update process of EXIF thumbnail

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
naoliv
Posts: 110
Joined: 2007-12-10T18:54:27-07:00
Location: Brazil

Status of the update process of EXIF thumbnail

Post by naoliv »

Hi!

Trying to clean the reported bugs on Debian now (in special this bug), I would like to know if ImageMagick is still affected by CAN-2005-0406 (if convert and mogrify, for example, are now updating the EXIF thumbnail when changing an image; and if possible, since when it has been fixed)

Thank you very much!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Status of the update process of EXIF thumbnail

Post by magick »

ImageMagick does not automatically remove the thumbnail from the EXIF profile. Instead the user has the option of removing the EXIF profile with -strip option for example. Or they can extract the EXIF profile, modify it with an external program, and re-inject it into the image.
naoliv
Posts: 110
Joined: 2007-12-10T18:54:27-07:00
Location: Brazil

Re: Status of the update process of EXIF thumbnail

Post by naoliv »

Hi!

Still about EXIF, and from this bug report, can't ImageMagick work losslessly when just striping the EXIF of a JPEG file? (for example, a simple "convert -strip input.jpg output.jpg")

Thank you!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Status of the update process of EXIF thumbnail

Post by anthony »

IM is not designed to do this. It is a image processor, and nor a specific image format handler. Lossless requires it to NOT process the image in a very format specific way.

It is however posible to create a JPEG->JPEG delegate that will strip the jpeg image losslessly and as long as IM does not have any other processing options (like -strip -taint -resize etc) it will just do file transfers.

It will still decode the image, but if the final result was not marked as 'tainted' it junks that and simply file transfers the original.

See IM Examples, Delegate Handling
http://www.imagemagick.org/Usage/files/#delegates
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
adambuchbinder

Re: Status of the update process of EXIF thumbnail

Post by adambuchbinder »

anthony wrote:IM is not designed to do this. It is a image processor, and nor a specific image format handler. Lossless requires it to NOT process the image in a very format specific way.

It is however posible to create a JPEG->JPEG delegate that will strip the jpeg image losslessly and as long as IM does not have any other processing options (like -strip -taint -resize etc) it will just do file transfers.

It will still decode the image, but if the final result was not marked as 'tainted' it junks that and simply file transfers the original.
There are also tools specifically designed for EXIF processing, like jhead. Running jhead -purejpg will strip everything other than the image data (i.e., thumbnail, comment and EXIF data) from the file. If you want to simply delete the thumbnail while leaving everything else intact, use jhead -dt. (There are also options to regenerate the thumbnail, set rotation on the image, and plenty of other things.)

Just a suggestion--it might be easier to use a specific tool than to adapt a generic one for this particular purpose.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Status of the update process of EXIF thumbnail

Post by anthony »

adambuchbinder wrote:
anthony wrote:IM is not designed to do this. It is a image processor, and nor a specific image format handler. Lossless requires it to NOT process the image in a very format specific way.

It is however posible to create a JPEG->JPEG delegate that will strip the jpeg image losslessly and as long as IM does not have any other processing options (like -strip -taint -resize etc) it will just do file transfers.

It will still decode the image, but if the final result was not marked as 'tainted' it junks that and simply file transfers the original.
There are also tools specifically designed for EXIF processing, like jhead. Running jhead -purejpg will strip everything other than the image data (i.e., thumbnail, comment and EXIF data) from the file. If you want to simply delete the thumbnail while leaving everything else intact, use jhead -dt. (There are also options to regenerate the thumbnail, set rotation on the image, and plenty of other things.)

Just a suggestion--it might be easier to use a specific tool than to adapt a generic one for this particular purpose.
As I mentioned. A delegate could be made so as to do the processing only using other external commands. See IM Examples, Delegate Handling
http://www.imagemagick.org/Usage/files/#delegates

This section has only just touched the surface of what IM could do with other programs.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply