topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:41 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Question about extra-large JPG  (Read 9710 times)

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Points: 101
  • Posts: 289
    • View Profile
    • Donate to Member
Question about extra-large JPG
« on: December 22, 2011, 01:41 PM »
OK, this doesn't really belong on this forum at all, but I couldn't think of a better community to ask.

I was going through wedding pictures from 2005 and found one that didn't make sense. The first image in a directory (titled 0000.JPG) is 120.9 MB. It opens fine and contains a picture from our wedding, 1536x1024. If I open and resave it in GIMP I get a 358 KB file (at 90% quality). The rest of the images in this directory are in the 6-8 MB range, and have the same dimensions.

SO, I was wondering if anyone could tell me
1. Why are all these 1.5 MP pictures so big?
2. Why is the first one even bigger?

Our photographer was an amateur and she had a failure with her CF card; we lost all our reception pictures. If I recall correctly, she sent in her memory cards and someone did some recovery on them.

Any ideas or leads? Would uploading the image help you help me?

Thanks, DCers.
Eric

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Question about extra-large JPG
« Reply #1 on: December 22, 2011, 02:52 PM »
Whilst I could not answer your Qs, from what you said I would suggest that you go for inspection/analysis - e.g., open up the images using IrfanView, or PhotoME, which can tell you quite a lot about image compression levels, sizes, aspect ratios, EXIF and IPTC data, camera details, etc.

Though I have not recovered images from CF cards, I have recovered deleted images from old hard drives, and the recovered files tend to be uniformly very large (much larger than their original size would have been), and I think that may be attributable to some of the .JPG compression ratio data being lost, so you would probably need to resample or recompress them to get the file size down - I'm not sure if that would be a lossy process, but I suspect it could be.

Sorry I can't offer anything more than that.

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #2 on: December 22, 2011, 02:57 PM »
Some quick multiplication says that a 1536x1024 image at 32bit colours (4bytes) would be 6mbs in size. So those smaller images are likely just in an uncompressed, or lossless compressed, format. Maybe it's to do with the recovery, or maybe the camera was just set not not compress the pictures to preserve the full original quality.

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Points: 101
  • Posts: 289
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #3 on: December 22, 2011, 03:26 PM »
I opened both 0000.JPG and another picture (0005.JPG, 7MB) in Phatch Image Inspector. Neither has any EXIF or IPTC information (or Pil, Pexif or Zexif). Apart from the filesize, they appear identical.

Code: Text [Select]
  1. aspect        none
  2. compression   none
  3. dpi           72
  4. filesize      126791680 [6979584 for 0005.JPG]
  5. format        JPEG (ISO 10918)
  6. gamma         None
  7. interlace     None
  8. mode          RGB
  9. size          (1536,1024)
  10. transparency  None
  11. type          JPG

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Points: 101
  • Posts: 289
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #4 on: December 22, 2011, 04:23 PM »
If anyone is ambitious/bored enough to look at these:
http://ericandchar.com/dc/0000.JPG [the big one]
http://ericandchar.com/dc/0001.JPG [a normal one]
http://ericandchar.com/dc/0065.JPG [one that doesn't work]

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Question about extra-large JPG
« Reply #5 on: December 22, 2011, 08:02 PM »
Interviewer: Is there anything you don't like?
Bjarne Stroustrup: Marketing hype as a substitute for technical argument. Thoughtless adherence to dogma. Pride in ignorance.
Wow! That is a totally awesome quote! I'm going to leverage curation using that quote to increase my big picture visibility and give persistence to my whitespace social media presence, going forwards.

(Sorry. Couldn't help myself.)    :-[

ayryq

  • Supporting Member
  • Joined in 2009
  • **
  • Points: 101
  • Posts: 289
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #6 on: December 22, 2011, 08:19 PM »
big picture visibility
Awesome; you even stayed on-topic! ;D

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Question about extra-large JPG
« Reply #7 on: December 22, 2011, 09:33 PM »
It was too good to resist...
...but back to business:

I have had a look at these 3 files using IrfanView and PhotoMe.
Files 0000.JPG and 0001.JPG seem to be OK, but have no EXIF data.

When trying to open file 0065.JPG:
  • IrfanView says: "Decode error ! Bogus marker length."
  • PhotoMe says: "The JPEG header of the selected image file is invalid."

Taking a look at file properties for all 3 files, they each have this oddity in common, at least: (I've never seen this before)
This file came from another
computer and might be blocked to
help protect this computer.
I selected "Unblock" for file 0065.JPG, but it seemed to make no difference.
Looking at file 0065.JPG with a text viewer (EditPad Lite) showed no interesting patterns or text strings.

I downloaded a trial version of Stellar Phoenix JPEG Repair and ran it on the file twice, but the proggy crashed each time, after quite a while scanning the file.

I did find this link, that might be of use: Repair Corrupt JPEG File by help of Hex Editor

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Question about extra-large JPG
« Reply #8 on: December 22, 2011, 09:58 PM »
JPEG files have designated areas for storing data. If the file is that large, then likely there's some garbage or null data somewhere. If you can simply recover the image then save it at 100% quality, you should be good.

I've had trouble opening some images with Irfanview in the past. That was simply because Irfanview skipped some error checking and just puked on some bad images. The data is still there, and some programs do check for those specific errors in images.

Anyways... don't worry too much about the massive file. Just recover it, then delete it.

I need to get some work done, so I can't check the files directly... Sorry... But I hope the above helps somewhat.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,739
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #9 on: December 25, 2011, 08:29 PM »
The large size of the files is almost certainly due to the recovery process. Most likely the recovery apps put some garbage/unrelated data inside of the JPG file blob, meta descriptors, etc. but not in such a place that it makes the image unable to load (fortunately!). If it were me I'd just batch convert them all to a lossless format (e.g. PNG), or a "max quality" (100 in many apps) JPG if nothing else, keeping in mind that even a max quality JPG is still lossy. You could do batch conversion with e.g. XnView.

Opening these images in XnView and doing a JPG lossless transform (e.g. rotate right) shows that the garbage data hypothesis is most likely correct. The image size dramatically reduces to around 300KB and the images look identical (as they should). In theory this is a totally lossless transform process, and no JPG recompression options are offered, so unless it's defaulting to something without notifying, I assume it hasn't recompressed.

I definitely recommend XnView as a powerful, versatile image processing and conversion app that can likely deal with these issues.

(standard disclaimer: I am not affiliated with XnView, just a huge fan and long-time user :D)

Update: finished downloading the other images and unfortunately XnView does not open 0065.JPG, so evidently it can't take care of this problem for all your images. If you have something else that opens 0065.JPG, use that to convert. XnView does fortunately work for the 120MB JPG.

- Oshyan
« Last Edit: December 27, 2011, 03:05 PM by JavaJones »

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #10 on: December 26, 2011, 12:27 PM »
It is hard to tell what is wrong with the large photo, but when I saved a renamed version with Quality=100% (in IrfanView) it was merely 720 kb - which on the other hand is too little! Even converted to 24-bits BMP it is still only 4½ MB. Weird problem.

yksyks

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 476
    • View Profile
    • Donate to Member
Re: Question about extra-large JPG
« Reply #11 on: December 26, 2011, 01:00 PM »
Definitely this is a result of the recovery, or possibly the camera might be faulty as well. Looking into binary contents of the large file revealed many times repeated string "Canon EOS DIGITAL REBEL XT". If this is the camera model then it looks like a part of firmware, which should not appear on the memory card, in my humble opinion. Fortunately all the viewers/editors I tried were able to dig through this pile of debris and get the valid data. The last file (0065.JPG) is overwritten with this kind of garbage completely, so there's probably nothing to restore.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Question about extra-large JPG
« Reply #12 on: December 26, 2011, 04:23 PM »
The filesystem on the CF card was probably partially corrupted, leading to a FAT entry for the big image claiming it was much larger than it is.
- carpe noctem