# .CR2 to .BMP or .TIFF?

This topic is 3757 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello Im using a Canon EOS-40D camera, and i have it set to RAW mode which outputs images in .CR2 format. I need to convert this image to something that i can use such as .BMP or .TIFF. I have to preserve as much quality as possible which format should i go with. Also how do i even convert .CR2 to these formats Thanks

##### Share on other sites
TIFF uses lossless compression, so I would go with that. I'm not sure if BMPs have native support for compression (I don't think they do, but I could be wrong seeing as many additions have been made to the format). If they do... well, then I'm not sure which would be more suitable.

I'm not familiar with CR2, so I'm not sure how you would convert them, especially since it is a proprietary Canon format. A quick trip to Google should help. ;-)

EDIT: Beaten to the Google punch. :-)

##### Share on other sites
Quote:
 Original post by GenuineXPTIFF uses lossless compression, so I would go with that. I'm not sure if BMPs have native support for compression (I don't think they do, but I could be wrong seeing as many additions have been made to the format). If they do... well, then I'm not sure which would be more suitable.

He's right, TIFF would be a bad choice. I think some BMP software supports compression, but most do not. This will cause your images to be HUGE! If you want decent losless compression, PNG is your best bet.

##### Share on other sites
thank you for the replies.

i cannot go with a .PNG unfortunately, so i guess im going to have to go with .TIFF. Also i needed a means of converting .CR2 programmatically, without external software, thanks for the google link though. The problem is that once i get it converted to .tiff, how can i get the RGB values from that...

##### Share on other sites
BMP only supports run-length compression, which isn't particularly useful for photos or other vaguely realistic images.

For most practical purposes BMP is a raw image with a header stuck on it.

##### Share on other sites
Photoshop opens CR2 (mine does anyways), save as TIFF as it support 16 bit per color.
Or save in Photoshops native format.

##### Share on other sites
I found a library called LibRaw that converts CR2 files to PPM and TIFF

heres some sample source code to convert CR2 to TIFF

//this code requires to include library - libraw.lib//and header libraw.h//code to convert CR2 to TIFFLibRaw iProcessor = NULL;iProcessor.open_file(".\\IMG_0001.CR2");iProcessor.unpack();iProcessor.imgdata.params.use_camera_wb = 1;iProcessor.imgdata.params.output_tiff = 1;iProcessor.dcraw_process();iProcessor.dcraw_ppm_tiff_writer("x.tiff");iProcessor.recycle();

i hope this helps for people looking to do the same thing

[Edited by - b1gjo3 on June 17, 2008 4:20:01 PM]

1. 1
2. 2
3. 3
Rutin
14
4. 4
5. 5

• 12
• 15
• 9
• 14
• 10
• ### Forum Statistics

• Total Topics
632655
• Total Posts
3007675
• ### Who's Online (See full list)

There are no registered users currently online

×