Skip to content

Commit 861d623

Browse files
committed
How RAW formats are detected
1 parent c82b328 commit 861d623

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

versioned_docs/version-4-pre/image_formats_support.mdx

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,98 @@ RAW image formats from digital cameras are supported as source images only (read
7373

7474
imgproxy uses [libraw](https://www.libraw.org/) to process RAW files. For a complete list of supported camera models and RAW formats, see the [libraw supported cameras list](https://www.libraw.org/supported-cameras).
7575

76+
### RAW format detection ((pro)) {#raw-detect}
77+
78+
imgproxy detects RAW formats using the following process:
79+
80+
1. **Standard format detection**: First, imgproxy attempts to detect if the file is in a known non-RAW format (such as JPEG, PNG, WebP, etc.) by using magic bytes signatures.
81+
2. **MIME type checking**: If no standard format is detected through magic bytes, imgproxy checks whether the MIME type matches any of the known RAW MIME types.
82+
3. **Extension checking**: If the MIME type does not match, imgproxy checks if the file extension matches any of the known RAW extensions.
83+
84+
<details>
85+
<summary>Supported RAW MIME types</summary>
86+
87+
```
88+
image/x-hasselblad-3fr
89+
image/x-adobe-dng
90+
image/x-sony-arw
91+
image/x-phaseone-cap
92+
image/x-canon-cr2
93+
image/x-canon-cr3
94+
image/x-canon-crw
95+
image/x-kodak-dcr
96+
image/x-epson-erf
97+
image/x-hasselblad-fff
98+
image/x-gopro-gpr
99+
image/x-phaseone-iiq
100+
image/x-kodak-k25
101+
image/x-kodak-kdc
102+
image/x-mamiya-mef
103+
image/x-leaf-mos
104+
image/x-minolta-mrw
105+
image/x-nikon-nef
106+
image/x-nikon-nrw
107+
image/x-olympus-orf
108+
image/x-sony-ori
109+
image/x-pentax-pef
110+
image/x-apple-proraw
111+
image/x-fuji-raf
112+
image/x-raw
113+
image/x-panasonic-rw2
114+
image/x-leica-rwl
115+
image/x-sony-sr2
116+
image/x-sony-srf
117+
image/x-samsung-srw
118+
image/x-sigma-x3f
119+
```
120+
121+
</details>
122+
123+
<details>
124+
<summary>Supported RAW file extensions</summary>
125+
126+
```
127+
.3fr
128+
.adng
129+
.arw
130+
.cap
131+
.cr2
132+
.cr3
133+
.crw
134+
.data
135+
.dcr
136+
.dng
137+
.eip
138+
.erf
139+
.fff
140+
.gpr
141+
.iiq
142+
.k25
143+
.kdc
144+
.mef
145+
.moc
146+
.mos
147+
.mdc
148+
.mrw
149+
.nef
150+
.nrw
151+
.orf
152+
.ori
153+
.pef
154+
.ppm
155+
.proraw
156+
.raf
157+
.raw
158+
.rw2
159+
.rwl
160+
.sr2
161+
.srf
162+
.srw
163+
.x3f
164+
```
165+
166+
</details>
167+
76168
## Converting animated images to MP4 ((pro)) {#converting-animated-images-to-mp4}
77169

78170
Animated image results can be converted to MP4 by specifying the `mp4` extension.

0 commit comments

Comments
 (0)