Page 3 of 3

Re: CR2 RAW file conversion

Posted: 2016-03-10T13:40:37-07:00
by jose.sanpedro
well, i toke a better look and your code generates a better result. colors are better. but still different that the original, but i think i can work with this. thanks!

Re: CR2 RAW file conversion

Posted: 2016-03-10T14:16:48-07:00
by snibgo
If you are doing further processing, don't write to JPG. Use another format such as PNG or TIFF, with compression none or LZW or ZIP.

If you simply want a JPG image, you could just use the JPEG preview that is embedded in the CR2 file.

Re: CR2 RAW file conversion

Posted: 2016-03-10T14:19:28-07:00
by jose.sanpedro
how can i use the jpeg preview embedded in the cr2 file? i need jpeg output

Re: CR2 RAW file conversion

Posted: 2016-03-10T23:46:00-07:00
by snibgo
1. List metadata from exiftool:

Code: Select all

exiftool -s2 -all -b -X -fXMP:XMP foto.cr2
2. Near the bottom, it shows:

Code: Select all

 Composite:PreviewImage='(Binary data 1706501 bytes, use -b option to extract)'
 Composite:ThumbnailImage='(Binary data 17031 bytes, use -b option to extract)'
3. Use the "-b" option to extract either or both:

Code: Select all

exiftool -Composite:PreviewImage -b foto.cr2 >preview.jpg

exiftool -Composite:ThumbnailImage -b foto.cr2 >thumb.jpg

Re: CR2 RAW file conversion

Posted: 2016-03-11T03:32:51-07:00
by Bonzo
You can get the jpg preview using Imagemagick as well as I did it a few years ago, but can not remember how. I am sure I posted on a thread about it on the forum.
From memory it is in the EXIF data as snibgo said.

Re: CR2 RAW file conversion

Posted: 2016-03-11T06:16:50-07:00
by jose.sanpedro
thanks snibgo! thats awesome...just what i needed! :D