Thumbnail does not show real photo content

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
olaola
Posts: 11
Joined: 2013-07-29T08:27:28-07:00
Authentication code: 6789

Thumbnail does not show real photo content

Post by olaola »

I am using imagemagick convert -composite command to combine some jpg with png files. I found for some of the photos, if I look at the thumbnail, it just display the original jpg content, but if i open it in any image tool, i can see the png content has been applied on it, and for most of the photos, the thumbnail are showing correctly.
I tried to find what caused the issue, but still have no clue, the only difference of these photos is they may be taken from different cameras.
Could anyone has any idea of the root cause of this issue and let me know how to fix it?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Thumbnail does not show real photo content

Post by Bonzo »

Could anyone has any idea of the root cause of this issue and let me know how to fix it?
No not from the information you have provided.

You need to at least post your code, Imagemagick version and probably one of the bad images.
olaola
Posts: 11
Joined: 2013-07-29T08:27:28-07:00
Authentication code: 6789

Re: Thumbnail does not show real photo content

Post by olaola »

The imagemagick version 6.7.4-9, and the command i used is
convert input.jpeg add.png -composite output.jpeg
I don't have the bad image, this issue does not happen on all the images, it only happened on certain jpeg file.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnail does not show real photo content

Post by fmw42 »

It may be a bug in that version of IM. But if you post links to your images that have this problem, others can test on more current versions of IM. You can upload your two input and one output image to dropbox.com (public folder) and put links here.
olaola
Posts: 11
Joined: 2013-07-29T08:27:28-07:00
Authentication code: 6789

Re: Thumbnail does not show real photo content

Post by olaola »

I tested on latest version of imagemagick, it still has this issue, and i found if i open this image in windows paint and save as another file, then i use the same command, the output image is ok with good thumbnail. Seems window paint can fix something in the EXIF data but ImageMagick can't.
I found an old post here , it says use jhead -gt command can fix this issue, i tried, it works,but i call imagemagick in java through iM4java, not sure how to use jhead in java.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnail does not show real photo content

Post by fmw42 »

It may be a malformed jpg or png image. You can post the images to say dropbox.com (public folder) and put links here. We can test further or one of the Developers can look more closely at the files.

Did you check to be sure you have the latest versions of libjpeg and libpng installed?
Post Reply