? corrupted JPG files

Discussion in 'Digital Cameras' started by JRS, Feb 23, 2006.

  1. JRS

    JRS Guest

    I know this is touched on regularly but I'm not sure if my case is different
    as the thumbs in windows explorer look perfect. However, when opening the
    file in a variety of applications (PSE4, PI10, ACDsee, Irfan, etc) the image
    is all there but seems to be divided into 4 or 5 large blocks with a
    different colour cast. one block has the correct tones though. does anyone
    know how i might fix this? This is how the image was stored on the CF card
    and the picture taken with a dimage s414. sods law its one of the best
    pictures.

    i have tried various image recovery programmes but they just recover the
    same image off the CF

    Thanks

    jon
     
    JRS, Feb 23, 2006
    #1
    1. Advertisements

  2. JRS

    Hunt Guest

    Yes, the file(s) has become corrupted. In most cases, it will be beyond
    repair, other than manually cutting apart the image, placing the parts on
    separate Layers (PS, and maybe PSE, or similar), making corrections to the
    color/density and maybe contrast, then Flatteneing the resulting image.

    First thing I would do, however, is copy all of the files to a backup
    direcctory, and run a file checker program on the "originals," like Norton
    Utilities, DiskDr. There are others out there, and some may be much better.
    See if this finds any problems. If not, look into file recovery programs (
    Google should yield 1,000+ hits), and try some. Again, some will be better
    than others, and many should have "trial" versions. If one does a great job of
    recovering your files, buy it. I know you have tried some, but again, some are
    better than others. I'd go for quite a few, just to see the results. Maybe ALL
    will just yield the corrupt file.

    Lastly, grab your BU CD, or DVD and just restore the files, providing that you
    made one.

    There is probably a problem developing with your HDD. Check it out well, and
    have a backup handy, as you are likely to need it sooner, rather than later.
    Either that, or you have a piece of software (editing, maybe) that is Saving
    corrupted files. Is there a common thread in these files? Maybe all were
    editied in PSE vX? If nothing is common, the HDD is the likely suspect.

    I doubt that you will find an image viewing/editing program that will "fix"
    the files, other than manually doing it.

    Hunt
     
    Hunt, Feb 23, 2006
    #2
    1. Advertisements

  3. JRS

    ASAAR Guest

    Is there any chance that you used a computer to format the CF card
    in a card reader prior to taking the pictures? Are the pictures
    still on the card, and if so, does the camera display them properly?
     
    ASAAR, Feb 23, 2006
    #3
  4. JRS

    ASAAR Guest

    What I had in mind was that if formatted using the computer, the
    card may now have a FAT32 file system on it, with the camera
    assuming that it was formatted as FAT16. If this is what caused the
    problem you probably could have used a USB cable to transfer good
    copies of the pictures to the computer, whereas using a card reader
    for the transfer would result in bad copies. It's best to always
    format cards using the camera at least once before they're used, but
    before doing this now, it might be wise to take a bunch of test
    shots to test this theory. If you get bad copies of your pictures
    even if they're transferred using the USB then the problem has a
    different cause. But if they come across OK using USB but not if
    using the card reader, then you probably can assume that the camera
    is not defective, and formatting the card in the camera might well
    solve the problem.

    If only a few of the pictures had the bad blocks with unusual
    color casts, you may have to make a large number of test shots to
    have confidence in the test. But if most or all were corrupted,
    then it should only take a few pictures. If all of the pictures
    transfer OK using the USB, it only takes one bad copy using the card
    reader to "prove" the theory.
     
    ASAAR, Feb 23, 2006
    #4
  5. JRS

    Bill Funk Guest

    If the card was formatted to FAT32, while the camera didn't recognize
    FAT32, would the camera be able to put any image files on the card at
    all?
    I think the camera would come up with an error, either not recognizing
    the card, or offering to format the card, wouldn't it?

    For JRS: that sort of corruption happens, sometimes, for reasons
    unknown. A single incident, all by itself, with no other corrupted
    images, can be caused by something as unfortunate as a cosmic ray
    (alpha particle? Beta particle? Someone help me...) or a power glitch.
    If it doesn't happen regularly, there's not much to fix with the
    camera/card.
    Fixing the image is possible with time; as has been sugested, working
    on each individual part of the corrupted image can bring it back.
    Good luck!
     
    Bill Funk, Feb 23, 2006
    #5
  6. JRS

    ASAAR Guest

    There's no telling what would happen, because it depends on how
    the code (in the camera) was written to handle card file I/O. Some
    cameras might see an incompatible card and display an error message,
    others might have poor error checking and slog on, interpreting the
    FAT and its pointers and block sizes in a manner consistent with its
    own mis-assumptions, but sure to cause problems by a computer using
    the correct assumptions used by the formatting program.

    Maybe beta particles. I don't know the makeup of cosmic rays;
    they might consist primarily of very energetic gamma rays and a
    photon torpedo or two. :) Alphas are much shorter range and more
    easily blocked by the inner package coatings that became fairly
    common in mid 80's to early 90's, I think. The worst offenders were
    the expensive mil-spec ceramic packages, because the ceramic
    material contained lots of unsuspected alpha emitters.

    Unfortunately, JRS didn't detail how widespread the problem was,
    which I alluded to in the testing method, ie, corruption in all
    files, just a few, or something in between. As you say, a single
    incident might corrupt a file or two, or if in the right place, wipe
    out the entire card. But corruption to more than a tiny number of
    files probably indicates some other type of problem.

    I saw a few corrupted images about a year ago on a card in a
    supposedly "new" camera. It was quickly returned, as I had no clue
    as to whether the camera was in any way responsible. A description
    of the bad images (about half were good) would have sounded similar
    to what JRS described, and I wouldn't have been able to reconstruct
    them without extensive image loss. A custom program designed to
    look for and clean up damaged jpg structures might have helped, but
    I'm not familiar with any software like that, and the damaged files
    meant nothing to me anyway . . .
     
    ASAAR, Feb 24, 2006
    #6
  7. JRS

    Hunt Guest

    [SNIP]

    Good to hear that you have the BUs. If you happen to track down the problem,
    please let us know. One never knows when they can benefit, down the road, from
    another's misfortune.

    If you ever do need to try and reconstruct one of these damaged JPGs in PS,
    let me know, and I can step you through the process. It's not difficult, but
    does require a bit of work, and getting the masks just right at the junctions
    can take some time and trial-n-error.

    Hunt
     
    Hunt, Feb 24, 2006
    #7
  8. JRS

    Bill Funk Guest

    That is impressive!
    I wonder how it does that.
     
    Bill Funk, Feb 24, 2006
    #8
  9. JRS

    Martin Brown Guest

    The thumbnails almost always do. It is only when you try to decode the
    main JPEG stream that you encounter any corruption in the bulk data.

    Your corruption is somewhat different to the normal kind though. It is a
    much rarer situation where the JPEG encoder has done something very
    strange. Much more common is a block of the file missing or overwritten.
    To my amazement that is exactly what the camera appears to have
    recorded. There are identical JPEG coefficients for the same chunk of
    sky, tree and bush repeated twice in a block about 130000 bytes long
    starting at around offest 580000 in the file. If you look carefully at
    the original shot you can see the same branches repeated again in the
    sideslipped band.

    The really odd thing is that they are wrong in the JPEG bitstream and
    not byte alligned. And unlike normal corruption not in multiples of
    filesystem blocksize. It may be worth showing this image to Minolta as
    it was clearly the result of an in camera firmware glitch. Your image
    broke their encoder!

    All I could do with the main image 2272x1704 was to recover the parts
    that were there with no effort made to fill in the missing data. The
    tree looks a bit stunted and the bush flat topped as a result.

    http://www.nezumi.demon.co.uk/temp/

    As conv38fix.jpg (full resolution but with some missing data) 2230465
    bytes. I leave it there for a few days.

    The explanation of the other recovery program that found a 640x480 JPEG
    image is even weirder. It seems Minolta in their infinite wisdom have
    bolted a large thumnail onto the end of the file beyond the final EOI
    marker with a bit of random junk to keep it company. This isn't a
    feature of your damaged file - I checked a couple of sample review
    images too. They have the same quirky structure!

    This means if you cut a fair bit off the front you can obtain a 640x480
    JPEG by using any recovery program that recognises partial JPEG headers.

    Quite a few high MP cameras now add a secondary thumbnail of 640x480 to
    the application specific marker (presumably for faster in camera LCD
    review).

    Regards,
    Martin Brown
     
    Martin Brown, Feb 28, 2006
    #9
  10. JRS

    Martin Brown Guest

    Pixrecovery found an unencapsulated JPEG image 640x480 at the end of the
    main data - certainly better than nothing but it didn't fix the file.
    It recognised the orphanned JPEG header information near the end of the
    file and turned it into a valid decodable file.

    Regards,
    Martin Brown
     
    Martin Brown, Feb 28, 2006
    #10
  11. JRS

    Bill Funk Guest

    So the header missing will make the image show farkled as the OP's?
    Interesting.
     
    Bill Funk, Feb 28, 2006
    #11
  12. JRS

    Martin Brown Guest

    Missing headers usually stops standard decoders dead in their tracks
    with a "not a JPEG file" error, but custome codecs intended to handle
    broken data can put in sensible defaults and pray a little to decode
    incomplete streams. It is then a matter of putting a suitable header
    onto the orphan data to make a valid JPEG file.
    The damaged data is in the main 2272x1704 image stream which is
    completely separate and beyond sensible economic repair - part of it
    missing entirely and another part was duplicated.

    Regards,
    Martin Brown
     
    Martin Brown, Feb 28, 2006
    #12
  13. JRS

    ASAAR Guest

    No need to see. I'm well aware of that.

    True for cameras now hitting the market. Not true for older
    cameras designed before FAT32 was needed. Many of the new cameras
    sold a year ago won't ever work with cards greater than 512MB, and
    so their OS in most cases was not designed to even consider that
    FAT32 might have been used. There have been several threads in this
    newsgroup due to newbies formatting cards with a FAT32 file system
    using their computer, resulting in the camera failing totally, not
    even being able to reformat the card. New cameras will, if properly
    designed, do as you say, preventing many unnecessary customer
    service calls to Ralph in India.
     
    ASAAR, Feb 28, 2006
    #13
  14. JRS

    Martin Brown Guest

    None that I know of. It is too specialised and the decoder has to sit in
    its own stand alone program with a lot of cossetting and CPU time.
    You have to write one or modify an existed decoder. At present it
    requires expert human judgement of the output to close in on a solution.

    I may release a shareware version of a corrupt JPEG decoder when I can
    automate or at least de-skill the fine tuning. At present mending
    damaged JPEGs is only realistic for images with commercial value.

    Regards,
    Martin Brown
     
    Martin Brown, Mar 1, 2006
    #14
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.