Page 1 of 1

Is there any way to fix the grey area in the jpeg file?

Posted: 2016-08-24T04:35:56-07:00
by sasha
Hi there!
I have a jpeg file that has a grey area on the bottom of itself.
My jpeg file has not the end bytes "ff d9" on the end of itself. I don't find the bytes in a hex-editor.
I tried to fix this and added "ff d9", but the grey area didn't disappear anyway.

Jpeginfo shows the following warning: "premature end of JPEG file". Also I have another title of the problem "incomplete JPEG scan (grey area in the image)".

Is it possible to fix this?

Re: Is there any way to fix the grey area on the jpeg file?

Posted: 2016-08-24T04:52:36-07:00
by Bonzo
I would guess it is a faulty file usually caused by something going wrong with the generation. There is probably no image data beyond that point and that is why it is grey and sometimes black.
You would have to upload it to a file sharing service so people could take a look at it.

There is usually a thumbnail in the EXIF data which may be OK and you can sometimes recover that; but I can not remember how at the moment. This would be a very small file size though.

Re: Is there any way to fix the grey area in the jpeg file?

Posted: 2016-08-24T05:06:17-07:00
by snibgo
exiftool can say whether there is a thumbnail. If there is, then something like this might work:

Code: Select all

exiftool -Composite:ThumbnailImage -b badfile.jpg >out_thumb.jpg