Can imagemagick fix truncated or incomplete images

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
CatBurgers
Posts: 9
Joined: 2014-10-03T11:56:34-07:00
Authentication code: 6789

Can imagemagick fix truncated or incomplete images

Post by CatBurgers »

http://3fc68be784075022e210-30c1eab61c3 ... 080047.jpg

When opened in photoshop, we get the error "This document may be damaged (the file may be truncated or incomplete)." and identify --verbose returns a ton of "identify.exe: Corrupt JPEG data: found marker 0xd7 instead of RST3 `p9080047.jpg' @ warning/jpeg.c/JPEGWarningHandler/352."

Is there anything imagemagick to fix that error so that we can at least operate on it?
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Can imagemagick fix truncated or incomplete images

Post by GeeMack »

CatBurgers wrote:Is there anything imagemagick to fix that error so that we can at least operate on it?
I couldn't get ImageMagick 7 to open the file on a Windows 10 machine, but I can open it using IrfanView. It makes a 3648x2736 image that appears to have some missing rows on one edge and one end. It also seems to be a portrait orientation image displayed as landscape. I can Ctrl-C to copy it from the IrfanView window, then convert it to a PNG with ImageMagick at a Windows command line with this...

Code: Select all

magick clipboard: p9080047.png
The PNG file appears healthy other than those few missing rows and columns and its orientation.
nkostic
Posts: 1
Joined: 2017-05-27T03:48:50-07:00
Authentication code: 1151

Re: Can imagemagick fix truncated or incomplete images

Post by nkostic »

Did you find a solution for this. I have the same issue. Coldfusion uploads the photo, but imagemagic is giving me a hard time.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Can imagemagick fix truncated or incomplete images

Post by fmw42 »

Try one of the non-Imagemagick tools at http://www.imagemagick.org/Usage/formats/#jpg_non-im
Post Reply