enhance of cr2 Format to store exif and image dimension(cr2 spec link in thread) - General Discussion and Assistance - CHDK Forum

enhance of cr2 Format to store exif and image dimension(cr2 spec link in thread)

  • 6 Replies
  • 7815 Views
Advertisements
because DNG is slower due to byteswapping, what do you think is it possible to add to the cr2 Format all necessary information, that every program that can load cr2 files can load chdk cr2 files, show correct values of exif ?

I search for cr2 file spec.maybe this is usefull ?

http://lclevy.free.fr/cr2/
« Last Edit: 10 / September / 2011, 12:15:37 by Bernd R »
Ixus 1000 HS

*

Offline philmoz

  • *****
  • 3450
    • Photos
because DNG is slower due to byteswapping, what do you think is it possible to add to the cr2 Format all necessary information, that every program that can load cr2 files can load chdk cr2 files, show correct values od exif ?

I search for cr2 file spec.maybe this is usefull ?

http://lclevy.free.fr/cr2/

The RAW data in the Canon .CR2 file is stored using a 'lossless' JPEG compression.
AFAIK, this compression is done using the Digic processor in the camera.
If you don't compress the RAW data then it's not a compatible CR2 file.
Compressing the RAW data using the ARM CPU will take far longer than the DNG byte swapping.

If the CR2 file creation code exists in the firmware for both the ARM and Digic processors, and you figure out a way to enable it, then this might work.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

I look on some Camera manuals of Canon Camera they seem not have a compression enable disable switch.So no cr2 without compress and  cr2 of chdk is a special Format.

But when need a special format, wy not use DNG and save as little endian, and cr2 can drop ?. this is fast, and exif is in

The converter to make real DNG out of this need only byteswap data, and can be fast and need no camera specific code.maybe opensource software support sooner or later the DNG little endian Format of chdk too direct.The file extension can name .CHD

The content of  exif information in RAW i think is very important so the RAW converter can be able to choose from ISO value the profile for denoise and sharpen and from mm size the lens correction.
« Last Edit: 10 / September / 2011, 11:21:45 by Bernd R »
Ixus 1000 HS

*

Offline srsa_4c

  • ******
  • 4451
But when need a special format, wy not use DNG and save as little endian, and cr2 can drop ?. this is fast, and exif is in

The converter to make real DNG out of this need only byteswap data, and can be fast and need no camera specific code.maybe opensource software support sooner or later the DNG little endian Format of chdk too direct.The file extension can name .CHD

Most users wouldn't like the extra step, I'm afraid.
Like: "WHAT?? Photoshop can't open it??"  :blink:

But when need a special format, wy not use DNG and save as little endian, and cr2 can drop ?. this is fast, and exif is in

The converter to make real DNG out of this need only byteswap data, and can be fast and need no camera specific code.maybe opensource software support sooner or later the DNG little endian Format of chdk too direct.The file extension can name .CHD

Most users wouldn't like the extra step, I'm afraid.
Like: "WHAT?? Photoshop can't open it??"  :blink:

same happen with cr2 too.Or what program can read chdk cr2 format ?

I thought first cr2 work in same way as Canon cr2, because chdk name it cr2.
I can not show correct cr2 files from my camera, because i need recompile the converter.Ixus 1000 use diffrent bayer pattern.and because chdk cr2 have no exif in, so i stay with DNG.but its of course slower.

I see the cr2 converter work slow and show wrong color images from my camera.So i guess if chdk use a special format with a own converter, use a DNG file in little endian, can be faster and is easy to implement.

I think enhance of chdk cr2 so it store exif, image dimension and Bayer pattern format is lots more work,

« Last Edit: 10 / September / 2011, 12:13:53 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 14126
same happen with cr2 too.Or what program can read chdk cr2 format ?
CHDK raws are not in CR2 format. They are just some random data.  The extension has nothing to do with the format. CHDK lets the user pick the extension, CRW or CR2 just happen to be the defaults because files with certain naming patterns play better with the canon OS for transfering over USB or deleting from the canon UI. You can also use .WAV or .AVI but the raw will not be an audio file or movie ;)

Quote
I thought first cr2 work in same way as Canon cr2, because chdk name it cr2.
And now you know that is not true. extension != format.
Quote
I think enhance of chdk cr2 so it store exif, image dimension and Bayer pattern format is lots more work,
Don't call it "cr2" format unless it is actually crw2 format.

If we make a CHDK specific format, call it CHDK format.

Making an almost DNG that requires byteswap isn't a bad idea, but it *must* contain some additional header or something so it is not confused with real DNG, and it must not be called DNG. To make a format that looked like DNG but was not in valid DNG format would do everyone a big disservice (see the existing confusion based on extension... something that actually had what looked like a valid DNG header would be far worse). I would not agree with having something like this added to CHDK.

I would suggest
magic header  e.g. "CHDK"
version
offset of "dng" data (exactly like current DNG, without bytes swapped or badpixels removed)
...
DNG data

Maybe offset of the raw data inside the "dng". That would make in-camera processing (e.g. swapping bytes after the fact in camera or raw operations) simpler, since you wouldn't have to parse the whole DNG header.

I have brought this up previously: http://chdk.setepontos.com/index.php?topic=1390.msg53067#msg53067
« Last Edit: 10 / September / 2011, 16:02:23 by reyalp »
Don't forget what the H stands for.


I would suggest
magic header  e.g. "CHDK"
version
offset of "dng" data (exactly like current DNG, without bytes swapped or badpixels removed)
...
DNG data

Maybe offset of the raw data inside the "dng". That would make in-camera processing (e.g. swapping bytes after the fact in camera or raw operations) simpler, since you wouldn't have to parse the whole DNG header.

I have brought this up previously: http://chdk.setepontos.com/index.php?topic=1390.msg53067#msg53067

this sound good to me, the important point is in too, that it is not too much work for developers to support *.chdk files or add the features to chdk

many RAW converters use dcraw.if the chdk file extension can go to dcraw, need in some case not use a additional converter.

I dont understand wy adobe not enhance dng format spec to support little endian.I guess many camera do not support dng inside, because ARM CPU are mostly used as little endian.
Ixus 1000 HS

 

Related Topics


SimplePortal © 2008-2014, SimplePortal