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?".
(resized portrait source into the landscape output where unused area is filled with white)
The problem I have with this procedure is that the output jpeg does not retain the EXIF info from the source image.
Is there a way to tell IM to transfer EXIF data from the source to the output image?
Or, is there another way to achieve the above resize effect while keeping the EXIF data in the output?
(resized portrait source into the landscape output where unused area is filled with white)
The problem I have with this procedure is that the output jpeg does not retain the EXIF info from the source image.
Is there a way to tell IM to transfer EXIF data from the source to the output image?
Or, is there another way to achieve the above resize effect while keeping the EXIF data in the output?
I know nothing about transfer of EXIF data, but doubt any system will transfer that info after processing the image to make it smaller and insert it into another image background, etc, because the result is no longer the same image. What if I were to mosaic 100 images together? What EXIF data would you expect in the result? There may be tools that will let you copy the EXIF data from one image and then insert it into another image. You may want to do a Google search. I will stand corrected, if one of the IM teams says otherwise.
But as for your processing, an easier way is to resize the image and then pad it out with background color:
convert src.jpg -resize 720x480 -background white -gravity center -extent 720x480 out.jpg
However as a FYI this is what is actually going on.
When IM Alpha Composes two images. the meta-data for the image (the EXIF info, comments, labels, and other profiles, are taken from the destination image. that is the destination image is modified by the given source or overlay image.
In the above command the destination image (thanks to the +swap) is a blank white canvas! As such it has very little meta-data. There is little you can do about this as the final image size (what you are wanting from the compose) also comes from the destination image!!!
On the other hand -extent modifies the original image, and as such the meta-data of the original image is preserved, including the EXIF information.
The '-border -crop' method which is also on the IM Examples thumbnails page, will also preserve the meta-data and can be used for IM versions which are too old for the faster -extent method.