Jpeg image corrupt, Anyway to fix it.

11372 views
Skip to first unread message

jian

unread,
Dec 3, 2006, 11:12:17 AM12/3/06
to
I have a very important jpeg image corrupted. It have the right size,
and I think most of the data in the image are correct as well. The
preview is available. But gaim shows the following error information:

Corrupt JPEG data: bad Huffman code

EXIF data will be ignored.

Corrupt JPEG data: premature end of data segment

EXIF data will be ignored.

Corrupt JPEG data: premature end of data segment

EXIF data will be ignored.

Does any software do the job to fix this image. Thanks

Cheers,

Jian

CoMa

unread,
Dec 3, 2006, 11:39:57 AM12/3/06
to


Have you tried to open that image in another
program beside Gaim ?

Try XnView (supports Linux, Windows & MacOS)
http://www.xnview.com/
Can XnView open and display the image.

If you use Windows,
You try
IrfanView
http://www.irfanview.com/
FastStone ImageViewer
http://www.fastsone.org/

Butch Haynes

unread,
Dec 3, 2006, 12:32:52 PM12/3/06
to
"jian" <week...@gmail.com> wrote in message
news:1165162331.3...@80g2000cwy.googlegroups.com...

I've had good luck with freeware PC Inspector File Recovery on deleted or
trashed JPEGs. I think it's published by some German outfit.

Butch


Bear Bottoms

unread,
Dec 3, 2006, 12:45:32 PM12/3/06
to
On Sun, 03 Dec 2006 11:32:52 -0600, Butch Haynes <bu...@huntsville.prz>
wrote:

http://www.pcinspector.de/file_recovery/UK/welcome.htm

--
I Research Freeware http://bearbottoms1.com

jian

unread,
Dec 3, 2006, 2:04:20 PM12/3/06
to
Hey CoMa, thanks for your suggestion.

I did try it on different softwares. And even the popular image
recovery tools PixRecovery, it didn't work on it neither.

The reason I want to keep trying is that it seem most the the data in
the jpeg file are ok. since I look on the binary data on the file,
nearly every address have really data there. And furthermore, the
preview are working, but there have white blank edge on both top and
bottom of the preview.

The result of the image on every pics viewer are the same. It look like
an unfinished download image filled with grey on the rest 3/4 space.

Do you think there is any jpeg analyzer that can correct it? Thanks

jian

unread,
Dec 3, 2006, 2:07:55 PM12/3/06
to
Hey Bear, Thanks for you help.

The problem for me is little bit diffcult here. Since I copy the image
for someelse's camera, which it still worked ok. However, the image
went wrong on my own HD, and I can't access to the flash card anymore.
So I think the data recovery software would work on my situation. but
thinks :)

jian

CoMa

unread,
Dec 3, 2006, 2:36:54 PM12/3/06
to
On 3 Dec 2006 11:04:20 -0800, "jian" <week...@gmail.com> wrote:

>Hey CoMa, thanks for your suggestion.
>
>I did try it on different softwares. And even the popular image
>recovery tools PixRecovery, it didn't work on it neither.
>
>The reason I want to keep trying is that it seem most the the data in
>the jpeg file are ok. since I look on the binary data on the file,
>nearly every address have really data there. And furthermore, the
>preview are working, but there have white blank edge on both top and
>bottom of the preview.
>
>The result of the image on every pics viewer are the same. It look like
>an unfinished download image filled with grey on the rest 3/4 space.
>
>Do you think there is any jpeg analyzer that can correct it? Thanks

Sorry to say that, but I think you are out of luck

----------------------------------------------------------------------------------
ound this text at http://www.hketech.com/JPEG-recovery/
--------------
if your picture does not contain all the contents of your
original photo (e.g. Windows viewer shows grey colour
in the lower portion instead of the details of your photo,
and you cannot find the missing details in other file),
then most likely that photo is not recoverable.
-------------------------------------------------------------------

Here is 2 other jpg programs (for windows) that maybe can help you
JPG Cleaner
http://www.rainbow-software.org/programs.html#JPG Cleaner
Bad Peggy
http://www.hotpixel.net/software.html

B. R. 'BeAr' Ederson

unread,
Dec 3, 2006, 2:44:39 PM12/3/06
to
On 3 Dec 2006 08:12:17 -0800, jian wrote:

> I have a very important jpeg image corrupted. It have the right size,
> and I think most of the data in the image are correct as well. The
> preview is available.

First look with a hex viewer inside the file to ensure, that the
file looks okay. (No [very] large blocks of zeros, no data that
seems to stem from wrong files, like text.) After that use the
JpegInfo utility from here:

www.picturel.com/utils.html

to see what parts of the file contain structural errors. Report
back if you find additional information to that you already posted.
Maybe we find additional ways to help you.

Put the file somewhere on the Net to have people look and analyze
for themselves, if the picture isn't confidential, too private,...

BeAr
--
===========================================================================
= What do you mean with: "Perfection is always an illusion"? =
===============================================================--(Oops!)===

B. R. 'BeAr' Ederson

unread,
Dec 3, 2006, 2:54:17 PM12/3/06
to
On 3 Dec 2006 11:04:20 -0800, jian wrote:

> The result of the image on every pics viewer are the same. It look like
> an unfinished download image filled with grey on the rest 3/4 space.

Sounds like a task for Repair-Jpeg by Wim Vanmaele. You can download
it from the website socrtwo set up here:

www.s2services.com/jpg-bmp.htm

The program isn't prefect and the documentation a bit sparse, but
you can have a look at the step-by-step guide I provided socrtwo
half a year ago:

http://groups.google.de/group/alt.comp.freeware/msg/9546db4e44a0315e

HTH.

Paul Lutus

unread,
Dec 3, 2006, 3:35:33 PM12/3/06
to
jian wrote:

> Hey CoMa, thanks for your suggestion.
>
> I did try it on different softwares. And even the popular image
> recovery tools PixRecovery, it didn't work on it neither.
>
> The reason I want to keep trying is that it seem most the the data in
> the jpeg file are ok. since I look on the binary data on the file,
> nearly every address have really data there. And furthermore, the
> preview are working, but there have white blank edge on both top and
> bottom of the preview.
>
> The result of the image on every pics viewer are the same. It look like
> an unfinished download image filled with grey on the rest 3/4 space.

Chances are the file was not fully saved, and this was (90% certainty)
caused by someone disconnecting a storage device without using "safely
remove". This feature is present to allow fast reads and writes, but it
means a file is not fully written unless and until you invoke "safely
remove" before disconnecting a storage device.

It is most likely that the remainder of the image is simply not there, no on
your HDD. This means you will never have the entire image, and no repair
utility can provide missing image data.

--
Paul Lutus
http://www.arachnoid.com

B. R. 'BeAr' Ederson

unread,
Dec 3, 2006, 4:05:33 PM12/3/06
to
On Sun, 03 Dec 2006 12:35:33 -0800, Paul Lutus wrote:

>> The result of the image on every pics viewer are the same. It look like
>> an unfinished download image filled with grey on the rest 3/4 space.
>
> Chances are the file was not fully saved, and this was (90% certainty)
> caused by someone disconnecting a storage device without using "safely
> remove".

It's all speculation. But I don't think what you guessed applies
here. Jian wrote about the image being the correct size and about
errors in the Huffman table *and* the preview. That doesn't sound
like an aborted copy process, but like erroneous data inside the
file header (e.g. the start of the file).

As I said above - it's all speculation... ;-)

And besides, repairing a *.jpg having more than one faulty byte
within the encoding tables will be near to impossible. :-(

jian

unread,
Dec 3, 2006, 7:10:22 PM12/3/06
to
Thanks very much for all you guys efforts. I think Paul's guess is
right. There are something I was missed on last time when I checked it.
There is 2 empty and stuffed block in the middle. One of them is just
about 16kB size. I'd rather give up trying. I have attach the segment
information below. But thanks very much for your help.

best,

jian

======================
File 324.JPG.

Image #01: SOI @ 000000
EOI @ 001C14
Image #02: SOI @ 000000
EOI @ 00196F
Image #03: SOI @ 000000
EOI @ 001C14


----- [ Structure Analysis of file: 324.JPG ]-----

000000 : --- Marker
Start of Image 01


000002 : --- Marker
Reserved for Application Segments
Application Segment Length = 1C13


001C17 : --- Marker
Define Quantization Table(s)
Lq = 0084 - Quantization Table Definition Length
Pq = 0 - Quantization Table Element Precision
8-Bit elemental precision
Tq = 0 - Quantization Table Identifier

001C9D : --- Marker
Define Huffman Table(s) - Huffman Table Specs
Lh = 01A2 - Huffman Table Definition Length
Tc = 0 - Table Class is: Lossless Method
Th = 0 - Huffman Table Identifier


001FC4 : --- Marker
Baseline DCT - Non-Differential Huffman Coding
Lf = 0011 - Length of the Frame Header
P = 08 - Sample Precision
Y = 0798 - Number of Lines in Source Image
X = 0A20 - Number of Samples Per Line
Nf = 03 - Number of Frame Components


001FD7 : --- Marker
Start of Scan
Ls = 000C - Scan Header Length
Ns = 03 - Number of Image Components

Values below are in decimal:
Cs_[1..3] = Scan Component Selector
Td_[1..3] = DC Entropy Coding Table Selector
Ta_[1..3] = AC Entropy Coding Table Selector

Ss = 00 - Start of Spectral or Predictor Selection
Se = 3F - End of Spectral Selection
Ah = 00 - Successive approximation bit position high
Al = 00 - Successive approximation bit position low

000183 : --- Marker
Start of Image 01


000185 : --- Marker
Reserved for Application Segments
Application Segment Length = 196D


001AF4 : --- Marker
Define Quantization Table(s)
Lq = 0084 - Quantization Table Definition Length
Pq = 0 - Quantization Table Element Precision
8-Bit elemental precision
Tq = 0 - Quantization Table Identifier

001B7A : --- Marker
Define Huffman Table(s) - Huffman Table Specs
Lh = 01A2 - Huffman Table Definition Length
Tc = 0 - Table Class is: Lossless Method
Th = 0 - Huffman Table Identifier


001EA1 : --- Marker
Baseline DCT - Non-Differential Huffman Coding
Lf = 0011 - Length of the Frame Header
P = 08 - Sample Precision
Y = 0798 - Number of Lines in Source Image
X = 0A20 - Number of Samples Per Line
Nf = 03 - Number of Frame Components


001EB4 : --- Marker
Start of Scan
Ls = 000C - Scan Header Length
Ns = 03 - Number of Image Components

Values below are in decimal:
Cs_[1..3] = Scan Component Selector
Td_[1..3] = DC Entropy Coding Table Selector
Ta_[1..3] = AC Entropy Coding Table Selector

Ss = 00 - Start of Spectral or Predictor Selection
Se = 3F - End of Spectral Selection
Ah = 00 - Successive approximation bit position high
Al = 00 - Successive approximation bit position low

00C867 : --- Marker
End of Image 01


000306 : --- Marker
Start of Image 02


000308 : --- Marker
Reserved for Application Segments
Application Segment Length = 1C13


001F1D : --- Marker
Define Quantization Table(s)
Lq = 0084 - Quantization Table Definition Length
Pq = 0 - Quantization Table Element Precision
8-Bit elemental precision
Tq = 0 - Quantization Table Identifier

001FA3 : --- Marker
Define Huffman Table(s) - Huffman Table Specs
Lh = 01A2 - Huffman Table Definition Length
Tc = 0 - Table Class is: Lossless Method
Th = 0 - Huffman Table Identifier


0022CA : --- Marker
Baseline DCT - Non-Differential Huffman Coding
Lf = 0011 - Length of the Frame Header
P = 08 - Sample Precision
Y = 0798 - Number of Lines in Source Image
X = 0A20 - Number of Samples Per Line
Nf = 03 - Number of Frame Components


0022DD : --- Marker
Start of Scan
Ls = 000C - Scan Header Length
Ns = 03 - Number of Image Components

Values below are in decimal:
Cs_[1..3] = Scan Component Selector
Td_[1..3] = DC Entropy Coding Table Selector
Ta_[1..3] = AC Entropy Coding Table Selector

Ss = 00 - Start of Spectral or Predictor Selection
Se = 3F - End of Spectral Selection
Ah = 00 - Successive approximation bit position high
Al = 00 - Successive approximation bit position low

00D748 : --- Marker
Reserved for Future JPEG Use


00E749 : --- Marker
Reserved for Future JPEG Use


00F74A : --- Marker
Reserved for Future JPEG Use


00074B : --- Marker
Reserved for Future JPEG Use


00174C : --- Marker
Reserved for Future JPEG Use


00274D : --- Marker
Reserved for Future JPEG Use


00374E : --- Marker
Reserved for Future JPEG Use


00474F : --- Marker
Reserved for Future JPEG Use


005750 : --- Marker
Reserved for Future JPEG Use


006751 : --- Marker
Reserved for Future JPEG Use


007752 : --- Marker
Reserved for Future JPEG Use


008753 : --- Marker
Reserved for Future JPEG Use


009754 : --- Marker
Reserved for Future JPEG Use


00A755 : --- Marker
Reserved for Future JPEG Use


00B756 : --- Marker
Reserved for Future JPEG Use


00C757 : --- Marker
Reserved for Future JPEG Use


00D758 : --- Marker
Reserved for Future JPEG Use


00E759 : --- Marker
Reserved for Future JPEG Use


00F75A : --- Marker
Reserved for Future JPEG Use


00075B : --- Marker
Reserved for Future JPEG Use


00175C : --- Marker
Reserved for Future JPEG Use


00275D : --- Marker
Reserved for Future JPEG Use


00375E : --- Marker
Reserved for Future JPEG Use


00475F : --- Marker
Reserved for Future JPEG Use


005760 : --- Marker
Reserved for Future JPEG Use


006761 : --- Marker
Reserved for Future JPEG Use


007762 : --- Marker
Reserved for Future JPEG Use


008763 : --- Marker
Reserved for Future JPEG Use


009764 : --- Marker
Reserved for Future JPEG Use


00A765 : --- Marker
Reserved for Future JPEG Use


00B766 : --- Marker
Reserved for Future JPEG Use


00C767 : --- Marker
Reserved for Future JPEG Use


00D768 : --- Marker
Reserved for Future JPEG Use


00E769 : --- Marker
Reserved for Future JPEG Use


00F76A : --- Marker
Reserved for Future JPEG Use


00076B : --- Marker
Reserved for Future JPEG Use


00176C : --- Marker
Reserved for Future JPEG Use


00276D : --- Marker
Reserved for Future JPEG Use


00376E : --- Marker
Reserved for Future JPEG Use


00D0AF : --- Marker
Reserved for Future JPEG Use


0004B0 : --- Marker
Reserved for Future JPEG Use


005B7D : --- Marker
End of Image 02

socrtwo

unread,
Dec 5, 2006, 10:34:49 PM12/5/06
to
My thanks again to B. R. 'BeAr' Ederson for helping me understand how
to use this app. I will put a link to his instructions on the site.

This commercial software:
http://www.hketech.com/JPEG-recovery/index.php, seems to work on the
same principle as Jpeg-repair. The 15 day trial is fully functional,
except you can't save the photos. You can get an idea of how Vanmaele
freeware works though.

Sorry but if I remember right, hketech too says that a grey block in
the picture is unrecoverable.

On Dec 3, 4:05 pm, "B. R. 'BeAr' Ederson"


<br.eder...@expires-2006-12-31.arcornews.de> wrote:
> On Sun, 03 Dec 2006 12:35:33 -0800, Paul Lutus wrote:
> >> The result of the image on every pics viewer are the same. It look like
> >> an unfinished download image filled with grey on the rest 3/4 space.
>
> > Chances are the file was not fully saved, and this was (90% certainty)
> > caused by someone disconnecting a storage device without using "safely

> > remove".It's all speculation. But I don't think what you guessed applies

B. R. 'BeAr' Ederson

unread,
Dec 7, 2006, 6:50:55 PM12/7/06
to
On 5 Dec 2006 19:34:49 -0800, socrtwo wrote:

[My hints for Repair-Jpeg usage]


> I will put a link to his instructions on the site.

That's okay. Btw.: Did you ever get an answer of the program author?
(You wrote you would try to contact Wim Vanmaele.)

> Sorry but if I remember right, hketech too says that a grey block in
> the picture is unrecoverable.

That's nearly always the case. But you'll usually recognize the cause
of such a corruption by looking at the file size or by detecting large
portions of non-data areas inside the file. The first postings of Jian
seemed to describe minor errors. If these errors were inside the header
tables, they could cause big errors with few incorrect bytes.

In his posting from the 4th of December he writes about 2 large errors
in the middle of the file. That implies corruption beyond repair. (But
it still sounds more like unspecific corruption than like an aborted
transmission.)

The JpegInfo data is problematic. JpegInfo unfortunately truncates all
addresses to 16 bit, although the 6 digit display suggests more. That's
why the real size of the 3 images is unknown. (There is a probability
that even the information about 3 embedded images is wrong due to the
corruption.) The inconsistencies of the header data results partly
from the corruption and may also derive from unknown format specifics.
JpegInfo doesn't understand the special features of SPIFF files with
directory structure, for instance. Therefore, it *might* be possible
to extract some good data from the file. But that's definitely not
for sure und most probably not worth the effort...

>> As I said above - it's all speculation... ;-)
>>
>> And besides, repairing a *.jpg having more than one faulty byte
>> within the encoding tables will be near to impossible. :-(

Still applies. ;-)

socrtwo

unread,
Dec 7, 2006, 7:14:48 PM12/7/06
to
No word from Wim (because I just wrote him now :-)) I did put your
instructions on my site because I think they are helpful. Thanks.

B. R. 'BeAr' Ederson wrote:

vanmae...@gmail.com

unread,
Dec 8, 2006, 3:51:43 AM12/8/06
to
hi,
I just return home from clinic. Yesterday evening, a car put me up
while cycling and I have some bad shoulder fractures, so wrting this is
painfull and dificult. please give me some days for recovery, then
I'll see

thx

B. R. 'BeAr' Ederson

unread,
Dec 8, 2006, 11:39:09 AM12/8/06
to
On 8 Dec 2006 00:51:43 -0800, vanmae...@gmail.com wrote:

> I just return home from clinic. Yesterday evening, a car put me up
> while cycling and I have some bad shoulder fractures, so wrting this is
> painfull and dificult. please give me some days for recovery, then
> I'll see

Take all the time you need! Thank you very much for the quick response.
(Especially, considering the circumstances...)

Get well soon!!

cheiny...@gmail.com

unread,
Mar 27, 2014, 11:14:56 PM3/27/14
to
Perhaps you like to try SoftOrbits Picture Doctor v2.0 which is use to recover jpg, jpeg and psd in batch processing. Currently they are having free giveaway at [http://pupuweb.com/softorbits-picture-doctor-v2-0-free-giveaway/]. Hope this help :)

amit.sh...@gmail.com

unread,
Jul 7, 2014, 6:19:53 AM7/7/14
to
i lost my all data while incurrpting the drive .. actually i were using bit locker to keep all my data safe bt the time when i was incurrpting the drive, my pc get shut down due to power down ... and when i rstarted my pc the all images n file gets currpted plz help ... the documents are not that much important bt all images are ,,, so plz tell me any software to repair this images
Reply all
Reply to author
Forward
0 new messages