Welcome Guest.   Make a donation to an author on the site July 29, 2014, 03:53:23 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
View the new Member Awards and Badges page.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Question about extra-large JPG  (Read 3096 times)
ayryq
Participant
*
Posts: 41

View Profile Give some DonationCredits to this forum member
« on: December 22, 2011, 01:41:16 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
Logged
IainB
Supporting Member
**
Posts: 4,551


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #1 on: December 22, 2011, 02:52:35 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.
Logged
Eóin
Charter Member
***
Posts: 1,400


O'Callaghan

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: December 22, 2011, 02:57:30 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.
Logged

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.
ayryq
Participant
*
Posts: 41

View Profile Give some DonationCredits to this forum member
« Reply #3 on: December 22, 2011, 03:26:04 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.

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  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
Logged
ayryq
Participant
*
Posts: 41

View Profile Give some DonationCredits to this forum member
« Reply #4 on: December 22, 2011, 04:23:17 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]
Logged
IainB
Supporting Member
**
Posts: 4,551


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: December 22, 2011, 08:02:36 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.)    embarassed
Logged
ayryq
Participant
*
Posts: 41

View Profile Give some DonationCredits to this forum member
« Reply #6 on: December 22, 2011, 08:19:43 PM »

big picture visibility
Awesome; you even stayed on-topic! Grin
Logged
IainB
Supporting Member
**
Posts: 4,551


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: December 22, 2011, 09:33:14 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)
Quote
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
Logged
Renegade
Charter Member
***
Posts: 10,889



Tell me something you don't know...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: December 22, 2011, 09:58:40 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.
Logged

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
***
Posts: 2,514



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: December 25, 2011, 08:29:27 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 cheesy)

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:35 PM by JavaJones » Logged

The New Adventures of Oshyan Greene - A life in pictures...
Curt
Supporting Member
**
Posts: 6,308

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #10 on: December 26, 2011, 12:27:15 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.
Logged
yksyks
Supporting Member
**
Posts: 460


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: December 26, 2011, 01:00:57 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.
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: December 26, 2011, 04:23:55 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.
Logged

- carpe noctem
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.051s | Server load: 0.08 ]