HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Hardware Newsgroups > Digital Photo

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2007, 11:26 PM
Mark
 
Posts: n/a
Default Corrupt JPG Files

Hi,

I have an HP R717 camera with a load of photos (jpg) on a 1 gig SD
card. The camera shows each photo preview fine and even allows me to
zoom in on each one (not just a thumbnail zoom - this is a zoom of the
actual picture). So it all looks fine. But, when I transfer the image
to the PC by popping the SD card in the PC, 9 images won't show (of
about 180). The errors I get depend on the method used on the PC, but
the all generally tell me that the jpg image is corrupt or unreadable.
I've tried MS Paint, paint shop pro, ifanview and a few others. I also
tried a couple of jpg repair tools - one called "all media" which told
me that there was nothing that could be repaired and the other I
forget the name, but it said much the same.

I've also tried the official HP software to grab the images from the
camera. The images are all transferred OK, but again, I have the
problem reading 9 of them on the PC.

A chkdsk on the memory card says that there are no errors (so I know
it's not a file system problem).

So, in a nutshell, everything on the PC says that 9 images are
unreadable, but the camera says that they are all fine! Oh - the file
sizes are all about right and the EXIF data are all there as well on
these 9 files, so if they are "corrupt", it must be something trivial
that the PC really cares about but which the camera isn't fussed
about. I know that the file system is OK, so it seems that the camera
has saved a few jpges in a format that it thinks is OK but which
isn't.

It's very frustrating to be able to see them on the camera but not on
the PC.

Any ideas?

TIA
Mark

Reply With Quote
Sponsored Links
  #2  
Old 04-10-2007, 12:04 AM
ASAAR
 
Posts: n/a
Default Re: Corrupt JPG Files

On 9 Apr 2007 16:26:23 -0700, Mark wrote:

> It's very frustrating to be able to see them on the camera but not on
> the PC.
>
> Any ideas?


Have you tried transferring the 9 problem pictures directly from
the camera to the computer using a USB cable?

Reply With Quote
  #3  
Old 04-10-2007, 06:13 AM
Mark
 
Posts: n/a
Default Re: Corrupt JPG Files

On 10 Apr, 01:04, ASAAR <cau...@22.com> wrote:
> On 9 Apr 2007 16:26:23 -0700, Mark wrote:
>
> > It's very frustrating to be able to see them on the camera but not on
> > the PC.

>
> > Any ideas?

>
> Have you tried transferring the 9 problem pictures directly from
> the camera to the computer using a USB cable?


Hi, indeed I have - same problem. I think this confirms that from the
perspective of the file system, the files are OK - it's just what's
_in_ the files that's the problem. Any other ideas? Maybe some program
that isn't very fussy (well, as fussy as the camera itself!) about the
jpg fomat? Just clutching at straws here.

Cheers

Reply With Quote
  #4  
Old 04-10-2007, 06:59 AM
Mike O'Sullivan
 
Posts: n/a
Default Re: Corrupt JPG Files

Mark wrote:
> On 10 Apr, 01:04, ASAAR <cau...@22.com> wrote:
>> On 9 Apr 2007 16:26:23 -0700, Mark wrote:
>>
>>> It's very frustrating to be able to see them on the camera but not on
>>> the PC.
>>> Any ideas?

>> Have you tried transferring the 9 problem pictures directly from
>> the camera to the computer using a USB cable?

>
> Hi, indeed I have - same problem. I think this confirms that from the
> perspective of the file system, the files are OK - it's just what's
> _in_ the files that's the problem. Any other ideas? Maybe some program
> that isn't very fussy (well, as fussy as the camera itself!) about the
> jpg fomat? Just clutching at straws here.
>
> Cheers
>

You could try downloading Recuva (free) and see if it solves the problem.

http://www.recuva.com/

Reply With Quote
  #5  
Old 04-10-2007, 03:20 PM
Mark
 
Posts: n/a
Default Re: Corrupt JPG Files

On 10 Apr, 07:59, Mike O'Sullivan <m...@nowhere.com> wrote:
> Mark wrote:
> > On 10 Apr, 01:04, ASAAR <cau...@22.com> wrote:
> >> On 9 Apr 2007 16:26:23 -0700, Mark wrote:

>
> >>> It's very frustrating to be able to see them on the camera but not on
> >>> the PC.
> >>> Any ideas?
> >> Have you tried transferring the 9 problem pictures directly from
> >> the camera to the computer using a USB cable?

>
> > Hi, indeed I have - same problem. I think this confirms that from the
> > perspective of the file system, the files are OK - it's just what's
> > _in_ the files that's the problem. Any other ideas? Maybe some program
> > that isn't very fussy (well, as fussy as the camera itself!) about the
> > jpg fomat? Just clutching at straws here.

>
> > Cheers

>
> You could try downloading Recuva (free) and see if it solves the problem.
>
> http://www.recuva.com/- Hide quoted text -
>
> - Show quoted text -


Thanks. The problem is that the files are there - they haven't been
deleted. Also, they are being transferred across to the PC failthfully
using every method. So, what the PC receives is exactly what is on the
camera. It seems that the camera has saved the files in a format that
it thinks is valid jpg (and a format that it can read) but which all
Windows apps (that I can find) say isn't valid. So, I'm not after
something that can recover files at the OS level - I really need
something that can make sense of the jpg files - a jpg repair tool. If
I have the camera's firmware, I could use that but I somehow don't
think HP will give it to me! Or indeed a tool that can analyse the
internal structure of the jpg to tell me _why_ the format isn't valid.
However, all they say is "unable to open file" or other unhelpful
things like that.




Reply With Quote
  #6  
Old 04-10-2007, 05:19 PM
jimbok
 
Posts: n/a
Default Re: Corrupt JPG Files

On 10 Apr 2007 08:20:27 -0700, "Mark" <news@mail.adsl4less.com> wrote:
> Or indeed a tool that can analyse the
>internal structure of the jpg to tell me _why_ the format isn't valid.
>However, all they say is "unable to open file" or other unhelpful
>things like that.
>


All valid jpg files contain fixed header information within the first
line of their data. If that data is corrupt, the file will not be
recognised by image viewers/editors as a valid jpg. You can view the
data with a "hex editor" (Google for a few freeware hex editors).
Using the hex editor, view the data of a few known GOOD jpgs and you
will see that the first few bytes of data are the same in each. Then
view a corrupted jpg to see if the first data line is the same. If
not, replace the first few dissimilar bytes of the bad jpg with the
exact same (positionally) bytes from the known good jpg. If the
problem you have was the result of corrupt header info, the corrupt
images should now be viewable. Save the modified copies with a
different name, of course.
A jpg's ending info (last few bytes) is also the same on jpgs. So, if
correcting the header info doesn't do the trick, check the ending
bytes and apply the same procedure as above, if necessary.
Have fun.

--
jimbok
Reply With Quote
  #7  
Old 04-10-2007, 07:00 PM
Sachin Garg
 
Posts: n/a
Default Re: Corrupt JPG Files


On Apr 10, 8:20 pm, "Mark" <n...@mail.adsl4less.com> wrote:
> On 10 Apr, 07:59, Mike O'Sullivan <m...@nowhere.com> wrote:
>
> > Mark wrote:
> > > On 10 Apr, 01:04, ASAAR <cau...@22.com> wrote:
> > >> On 9 Apr 2007 16:26:23 -0700, Mark wrote:

>
> > >>> It's very frustrating to be able to see them on the camera but not on
> > >>> the PC.
> > >>> Any ideas?
> > >> Have you tried transferring the 9 problem pictures directly from
> > >> the camera to the computer using a USB cable?

>
> > > Hi, indeed I have - same problem. I think this confirms that from the
> > > perspective of the file system, the files are OK - it's just what's
> > > _in_ the files that's the problem. Any other ideas? Maybe some program
> > > that isn't very fussy (well, as fussy as the camera itself!) about the
> > > jpg fomat? Just clutching at straws here.

>
> > > Cheers

>
> > You could try downloading Recuva (free) and see if it solves the problem.

>
> >http://www.recuva.com/

>
> Thanks. The problem is that the files are there - they haven't been
> deleted. Also, they are being transferred across to the PC failthfully
> using every method. So, what the PC receives is exactly what is on the
> camera. It seems that the camera has saved the files in a format that
> it thinks is valid jpg (and a format that it can read) but which all
> Windows apps (that I can find) say isn't valid. So, I'm not after
> something that can recover files at the OS level - I really need
> something that can make sense of the jpg files - a jpg repair tool. If
> I have the camera's firmware, I could use that but I somehow don't
> think HP will give it to me! Or indeed a tool that can analyse the
> internal structure of the jpg to tell me _why_ the format isn't valid.
> However, all they say is "unable to open file" or other unhelpful
> things like that.


If you can upload the images somewhere or email 1 of them to me, I can
try looking at what might be wrong in there.

Sachin Garg [India]
www.sachingarg.com | www.c10n.info

Reply With Quote
  #8  
Old 04-10-2007, 11:08 PM
socrtwo
 
Posts: n/a
Default Re: Corrupt JPG Files

On Apr 10, 1:19 pm, jimbok <jimkelREMOVEC...@frontiernet.net> wrote:
> On 10 Apr 2007 08:20:27 -0700, "Mark" <n...@mail.adsl4less.com> wrote:
>
> > Or indeed a tool that can analyse the
> >internal structure of the jpg to tell me _why_ the format isn't valid.
> >However, all they say is "unable to openfile" or other unhelpful
> >things like that.

>
> All valid jpg files contain fixed header information within the first
> line of their data. If that data iscorrupt, thefilewill not be
> recognised by image viewers/editors as a valid jpg. You can view the
> data with a "hex editor" (Google for a few freeware hex editors).
> Using the hex editor, view the data of a few known GOOD jpgs and you
> will see that the first few bytes of data are the same in each. Then
> view a corrupted jpg to see if the first data line is the same. If
> not, replace the first few dissimilar bytes of the bad jpg with the
> exact same (positionally) bytes from the known good jpg. If the
> problem you have was the result ofcorruptheader info, thecorrupt
> images should now be viewable. Save the modified copies with a
> different name, of course.
> A jpg's ending info (last few bytes) is also the same on jpgs. So, if
> correcting the header info doesn't do the trick, check the ending
> bytes and apply the same procedure as above, if necessary.
> Have fun.
>
> --
> jimbok


The links below could possibly help. By the way, maybe the camera is
viewing the JPG preview. There are actually two images in each jpg
file, a thumbnail, or maybe bigger "preview", that Windows actually
uses for the thumbnail views, and the actual image. One can be
corrupt and the other not. Also I would look into trying to recover
the file as if they were deleted from your camera. That is try a
camera memory card undeleter too and see if this improves the quality
of the files. (That's the second link below).

http://www.s2services.com/photoandimagefreeware.htm
http://www.s2services.com/cameraundeletefreeware.htm

Reply With Quote
  #9  
Old 04-11-2007, 09:36 AM
Martin Brown
 
Posts: n/a
Default Re: Corrupt JPG Files

On Apr 10, 12:26 am, "Mark" <n...@mail.adsl4less.com> wrote:

> I have an HP R717 camera with a load of photos (jpg) on a 1 gig SD
> card. The camera shows each photo preview fine and even allows me to
> zoom in on each one (not just a thumbnail zoom - this is a zoom of the
> actual picture). So it all looks fine. But, when I transfer the image


You have to be a bit careful about this. Some digicams put more than
one size of thumbnail into the header (although I don;t think the HP
R717 does). But it is possible that the other voluminous guff they put
into their headers might confuse some codecs. The other possibility is
that the main JPEG data stream is genuinely corrupt.

> to the PC by popping the SD card in the PC, 9 images won't show (of
> about 180). The errors I get depend on the method used on the PC, but
> the all generally tell me that the jpg image is corrupt or unreadable.
> I've tried MS Paint, paint shop pro, ifanview and a few others. I also
> tried a couple of jpg repair tools - one called "all media" which told
> me that there was nothing that could be repaired and the other I
> forget the name, but it said much the same.


Irfanview will usually have a stab at most things. Have you tried
opening the bad images in a web browser?
They have the most fault tolerant JPEG decoders of any commonly
available software.
>
> I've also tried the official HP software to grab the images from the
> camera. The images are all transferred OK, but again, I have the
> problem reading 9 of them on the PC.
>
> A chkdsk on the memory card says that there are no errors (so I know
> it's not a file system problem).


You only know that it isn't a file system fault that chkdsk can find.
Card reader bugs in USB transfer to the PC are still candidate faults.
If you can mount the camera as a removable disk drive and examine the
faulty images inside the camera then that will eliminate the USB
drivers from the card reader (some of which are known to be pretty
dicey).
>
> So, in a nutshell, everything on the PC says that 9 images are
> unreadable, but the camera says that they are all fine! Oh - the file
> sizes are all about right and the EXIF data are all there as well on
> these 9 files, so if they are "corrupt", it must be something trivial
> that the PC really cares about but which the camera isn't fussed
> about. I know that the file system is OK, so it seems that the camera
> has saved a few jpges in a format that it thinks is OK but which
> isn't.
>
> It's very frustrating to be able to see them on the camera but not on
> the PC.
>
> Any ideas?


Try accessing them from the PC using the camera as a drive.

I would be interested in examining a couple of these sample corrupt
JPEG images to determine if the fault is repairable or not. Please
drop me a line priavtely. Determining the nature of the fault is quick
and easy and can help improve the repair technique. It is probably
only worth fixing them at present if they have commercial value.

Regards,
Martin Brown
(the strange reply to address is valid)

Reply With Quote
  #10  
Old 04-11-2007, 07:17 PM
Mark
 
Posts: n/a
Default Re: Corrupt JPG Files

On Apr 11, 10:36 am, "Martin Brown" <|||newspam...@nezumi.demon.co.uk>
wrote:
> On Apr 10, 12:26 am, "Mark" <n...@mail.adsl4less.com> wrote:
>
> > I have an HP R717 camera with a load of photos (jpg) on a 1 gig SD
> > card. The camera shows each photo preview fine and even allows me to
> > zoom in on each one (not just a thumbnail zoom - this is a zoom of the
> > actual picture). So it all looks fine. But, when I transfer the image

>
> You have to be a bit careful about this. Some digicams put more than
> one size of thumbnail into the header (although I don;t think the HP
> R717 does). But it is possible that the other voluminous guff they put
> into their headers might confuse some codecs. The other possibility is
> that the main JPEG data stream is genuinely corrupt.
>
> > to the PC by popping the SD card in the PC, 9 images won't show (of
> > about 180). The errors I get depend on the method used on the PC, but
> > the all generally tell me that the jpg image is corrupt or unreadable.
> > I've tried MS Paint, paint shop pro, ifanview and a few others. I also
> > tried a couple of jpg repair tools - one called "all media" which told
> > me that there was nothing that could be repaired and the other I
> > forget the name, but it said much the same.

>
> Irfanview will usually have a stab at most things. Have you tried
> opening the bad images in a web browser?
> They have the most fault tolerant JPEG decoders of any commonly
> available software.
>
>
>
> > I've also tried the official HP software to grab the images from the
> > camera. The images are all transferred OK, but again, I have the
> > problem reading 9 of them on the PC.

>
> > A chkdsk on the memory card says that there are no errors (so I know
> > it's not a file system problem).

>
> You only know that it isn't a file system fault that chkdsk can find.
> Card reader bugs in USB transfer to the PC are still candidate faults.
> If you can mount the camera as a removable disk drive and examine the
> faulty images inside the camera then that will eliminate the USB
> drivers from the card reader (some of which are known to be pretty
> dicey).
>
>
>
> > So, in a nutshell, everything on the PC says that 9 images are
> > unreadable, but the camera says that they are all fine! Oh - the file
> > sizes are all about right and the EXIF data are all there as well on
> > these 9 files, so if they are "corrupt", it must be something trivial
> > that the PC really cares about but which the camera isn't fussed
> > about. I know that the file system is OK, so it seems that the camera
> > has saved a few jpges in a format that it thinks is OK but which
> > isn't.

>
> > It's very frustrating to be able to see them on the camera but not on
> > the PC.

>
> > Any ideas?

>
> Try accessing them from the PC using the camera as a drive.
>
> I would be interested in examining a couple of these sample corrupt
> JPEG images to determine if the fault is repairable or not. Please
> drop me a line priavtely. Determining the nature of the fault is quick
> and easy and can help improve the repair technique. It is probably
> only worth fixing them at present if they have commercial value.
>
> Regards,
> Martin Brown
> (the strange reply to address is valid)


Replying to all the posts (and thansk for all the replies)...

- I tried a disk recovery utility and it just said that, as expected,
there was nothing to recover.

- Re looking at the header in a hex editor and copying it from one to
the other, apart from the first 16 bytes (where IIRC one byte
differs), I couldn't see any obvious differences between the normal
jpgs and the "corrupt" ones.

- Re the camera just showing a preview, yes it's possible but when I
enlarge it, it really does look like the full image. That is, as it
enlarges, it doesn't pixelate. OK, it could, I suppose, be
interpolating, but if it has access to the whole image, I couldn't see
the point in doing that!

- I tried the image in web browsers - Firefox and IE: nether could
display them (red "x").

- However, I did manage to open the images in MS Picture Manager and
to my surprise, it did open without error but gave me a big black
image! I tried saving the image in a different format and a new jpg,
but each time, it gave a generic "unable to save" try error. (In true
MS style, it then invited me to try again!)

- I also knocked up a quick C# app to open up the file and the file
open fails with a "generic GDI+ error" (I think that's the exact
wording). I didn't dip down to GDI however.

- The camera has two modes: disk drive and camera mode when connecting
to the PC. The former obviously shows the card as a disk drive but the
latter does show it as a camera (and therefoew loads the XP wizard
that invited the import of the images, though they are still available
in Explorer). I tried both with exactly the same results.

I'm convinced that the PC is seeing the files correctly and that it's
a jpg problem that the camera just doesn't seem to care about.

- Re the various image recovery utilities, I'll give them all a punt
and if that fails, I'll email them over if the offer is still on.

Cheers
Mark

Reply With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Reply


Thread Tools
Display Modes



All times are GMT. The time now is 02:36 AM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger