Free webp to jpg
Canon-CR2

Canon Raw Version 2

image/x-canon-cr2 Released 2004 · by Canon Inc.

The image/x-canon-cr2 MIME type represents the Canon Raw Version 2 (CR2) file format. Introduced by Canon in 2004 with models like the EOS 1D Mark II and EOS 20D, CR2 replaced the earlier CRW format. It is a proprietary raw image format built on top of the standard TIFF specification. A CR2 file contains minimally processed, uncompressed or losslessly compressed (using lossless JPEG ITU-T81) pixel data directly from the camera's sensor. It also embeds EXIF metadata and usually two preview JPEGs (a small thumbnail and a high-resolution preview), allowing photographers maximum flexibility in post-processing exposure, white balance, and color grading without quality loss.

Photography & Raw Imaging ✦ HDR Production Ready

Technical Specifications

MIME Type
image/x-canon-cr2
Extensions
.cr2
Container
TIFF
Compression
Lossless JPEG (ITU-T81)
Algorithms
Lossless JPEG (ITU-T81)
Color Depth
12-bit (Per Channel), 14-bit (Per Channel)
Metadata
EXIF XMP ICC
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/cr2

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
49 49 2A 00 10 00 00 00 43 52 02 00
ASCII: II*.....CR..
HTTP Headers
Content-Type: image/x-canon-cr2
HTML Accept Attribute
accept="image/x-canon-cr2, .cr2"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Retains maximum sensor data, allowing extreme recovery of highlights and shadows that would be permanently lost in a JPEG
  • White balance and color profiling are not 'baked in', meaning they can be completely altered in post-production without degrading the image
  • Lossless compression ensures perfect pixel accuracy while reducing file size compared to fully uncompressed formats
Limitations
  • Proprietary format means it requires constant updates to raw processing engines (like Adobe Camera Raw) every time Canon releases a new camera model
  • Produces very large file sizes (often 20MB to 40MB per image depending on sensor resolution)
  • Cannot be directly embedded into web pages or used in standard HTML/CSS contexts

Developer Code Snippets

import magic
# Libmagic will reliably detect Canon CR2 by looking for the 'CR' signature inside the TIFF header
print(magic.from_file('photo.cr2', mime=True)) # Outputs 'image/x-canon-cr2'
const FileType = require('file-type');
const type = await FileType.fromFile('photo.cr2');
console.log(type.mime); // Outputs 'image/x-canon-cr2'
import (
    "bytes"
    "net/http"
)
// Native Go HTTP detection might only see the TIFF header and return 'image/tiff'.
// You must explicitly check for the 'CR' signature at offset 8.
// isCR2 := len(buf) > 12 && bytes.Equal(buf[0:4], []byte{0x49, 0x49, 0x2A, 0x00}) && bytes.Equal(buf[8:12], []byte{0x43, 0x52, 0x02, 0x00})
$mime = mime_content_type('photo.cr2');
echo $mime; // Standard PHP setups will resolve this to 'image/x-canon-cr2' if the magic database is up to date

File Detection Steps

How to programmatically detect a image/x-canon-cr2 file by reading its raw bytes:

  1. 1 CR2 files begin with the standard TIFF little-endian magic bytes 'II*\0' (Hex: 49 49 2A 00).
  2. 2 They are followed by a 4-byte integer offset to the first IFD (usually 0x00000010, Hex: 10 00 00 00).
  3. 3 The distinguishing CR2 signature 'CR\x02\x00' (Hex: 43 52 02 00) is located precisely at byte offset 8.

Software Support

A
Adobe Lightroom Classic / CC
C
Capture One
R
RawTherapee
ImageMagick ImageMagick

Conversion Tools

Share & Embed

Markdown Badge
Canon-CR2 Format Badge
[![Canon-CR2 Format](https://freewebptojpg.com/mime/image/canon-cr2/badge.svg)](https://freewebptojpg.com/mime/image/canon-cr2)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/canon-cr2/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="Canon-CR2 Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/canon-cr2.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is a CR2 file?

A CR2 file is a raw image file generated by Canon digital cameras. It contains raw, unprocessed sensor data, offering significantly higher dynamic range, detail, and color depth compared to a standard JPEG image.

How do I open a CR2 file?

Because CR2 is a raw format, standard web browsers and basic image viewers cannot render it natively. You need specialized software like Adobe Lightroom, Adobe Photoshop (via Camera Raw), Capture One, or free alternatives like RawTherapee and darktable.

What is the difference between CR2 and CR3?

CR3 is the successor to CR2, introduced by Canon in 2018. While CR2 is based on the TIFF file structure, CR3 is based on the ISO Base Media File Format (similar to MP4/HEIF) and introduces a new compressed raw option (C-RAW) that drastically reduces file size while maintaining high image quality.

Related Formats

Share this format