1 module libraw.const_;
2 
3 enum LIBRAW_DEFAULT_ADJUST_MAXIMUM_THRESHOLD = 0.75;
4 enum LIBRAW_DEFAULT_AUTO_BRIGHTNESS_THRESHOLD = 0.01;
5 
6 static if (!is(typeof(LIBRAW_MAX_ALLOC_MB_DEFAULT))) {
7 	enum LIBRAW_MAX_ALLOC_MB_DEFAULT = 2048L;
8 }
9 
10 static if (!is(typeof(LIBRAW_MAX_THUMBNAIL_MB_DEFAULT))) {
11 	enum LIBRAW_MAX_THUMBNAIL_MB_DEFAULT = 512L;
12 }
13 
14 static if (!is(typeof(LIBRAW_METADATA_LOOP_PREVENTION))) {
15 	enum LIBRAW_METADATA_LOOP_PREVENTION = 0;
16 }
17 
18 version (LIBRAW_NO_IOSPACE_CHECK) {}
19 else version = LIBRAW_IOSPACE_CHECK;
20 
21 version (LIBRAW_NO_CR3_MEMPOOL) {}
22 else version = LIBRAW_CR3_MEMPOOL;
23 
24 version (LIBRAW_NO_MEMPOOL_CHECK) {}
25 else version = LIBRAW_MEMPOOL_CHECK;
26 
27 enum LIBRAW_MAX_METADATA_BLOCKS = 1024;
28 enum LIBRAW_CBLACK_SIZE = 4104;
29 enum LIBRAW_IFD_MAXCOUNT = 10;
30 enum LIBRAW_CRXTRACKS_MAXCOUNT = 16;
31 
32 enum LIBRAW_AHD_TILE = 512;
33 
34 enum LibRaw_open_flags {
35 	LIBRAW_OPEN_BIGFILE = 1,
36 	LIBRAW_OPEN_FILE = 1<<1
37 }
38 
39 enum LibRaw_openbayer_patterns {
40 	RGGB = 0x94,
41 	BGGR = 0x16,
42 	GRBG = 0x61,
43 	GBRG = 0x49
44 }
45 
46 enum LibRaw_dngfields_marks {
47 	FORWARDMATRIX = 1,
48 	ILLUMINANT = 1 << 1,
49 	COLORMATRIX = 1 << 2,
50 	CALIBRATION = 1 << 3,
51 	ANALOGBALANCE = 1 << 4,
52 	BLACK = 1 << 5,
53 	WHITE = 1 << 6,
54 	OPCODE2 = 1 << 7,
55 	LINTABLE = 1 << 8,
56 	CROPORIGIN = 1 << 9,
57 	CROPSIZE = 1 << 10,
58 	PREVIEWCS = 1 << 11,
59 	ASSHOTNEUTRAL = 1 << 12,
60 	BASELINEEXPOSURE = 1 << 13,
61 	LINEARRESPONSELIMIT = 1 << 14
62 }
63 
64 enum LibRaw_As_Shot_WB_Applied_codes
65 {
66 	APPLIED = 1,
67 	CANON = 2,
68 	NIKON = 4,
69 	NIKON_SRAW = 8,
70 	PENTAX = 16
71 }
72 
73 //#define tagtypeIs(typex) (type == typex)
74 enum LibRaw_ExifTagTypes {
75   LIBRAW_EXIFTAG_TYPE_UNKNOWN   =  0,
76   LIBRAW_EXIFTAG_TYPE_BYTE      =  1,
77   LIBRAW_EXIFTAG_TYPE_ASCII     =  2,
78   LIBRAW_EXIFTAG_TYPE_SHORT     =  3,
79   LIBRAW_EXIFTAG_TYPE_LONG      =  4,
80   LIBRAW_EXIFTAG_TYPE_RATIONAL  =  5,
81   LIBRAW_EXIFTAG_TYPE_SBYTE     =  6,
82   LIBRAW_EXIFTAG_TYPE_UNDEFINED =  7,
83   LIBRAW_EXIFTAG_TYPE_SSHORT    =  8,
84   LIBRAW_EXIFTAG_TYPE_SLONG     =  9,
85   LIBRAW_EXIFTAG_TYPE_SRATIONAL = 10,
86   LIBRAW_EXIFTAG_TYPE_FLOAT     = 11,
87   LIBRAW_EXIFTAG_TYPE_DOUBLE    = 12,
88   LIBRAW_EXIFTAG_TYPE_IFD       = 13,
89   LIBRAW_EXIFTAG_TYPE_UNICODE   = 14,
90   LIBRAW_EXIFTAG_TYPE_COMPLEX   = 15,
91   LIBRAW_EXIFTAG_TYPE_LONG8     = 16,
92   LIBRAW_EXIFTAG_TYPE_SLONG8    = 17,
93   LIBRAW_EXIFTAG_TYPE_IFD8      = 18
94 }
95 
96 enum LIBRAW_EXIFTOOLTAGTYPE_int8u =       LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_BYTE;
97 enum LIBRAW_EXIFTOOLTAGTYPE_string =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_ASCII;
98 enum LIBRAW_EXIFTOOLTAGTYPE_int16u =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_SHORT;
99 enum LIBRAW_EXIFTOOLTAGTYPE_int32u =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_LONG;
100 enum LIBRAW_EXIFTOOLTAGTYPE_rational64u = LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_RATIONAL;
101 enum LIBRAW_EXIFTOOLTAGTYPE_int8s =       LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_SBYTE;
102 enum LIBRAW_EXIFTOOLTAGTYPE_undef =       LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_UNDEFINED;
103 enum LIBRAW_EXIFTOOLTAGTYPE_binary =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_UNDEFINED;
104 enum LIBRAW_EXIFTOOLTAGTYPE_int16s =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_SSHORT;
105 enum LIBRAW_EXIFTOOLTAGTYPE_int32s =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_SLONG;
106 enum LIBRAW_EXIFTOOLTAGTYPE_rational64s = LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_SRATIONAL;
107 enum LIBRAW_EXIFTOOLTAGTYPE_float =       LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_FLOAT;
108 enum LIBRAW_EXIFTOOLTAGTYPE_double =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_DOUBLE;
109 enum LIBRAW_EXIFTOOLTAGTYPE_ifd =         LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_IFD;
110 enum LIBRAW_EXIFTOOLTAGTYPE_unicode =     LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_UNICODE;
111 enum LIBRAW_EXIFTOOLTAGTYPE_complex =     LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_COMPLEX;
112 enum LIBRAW_EXIFTOOLTAGTYPE_int64u =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_LONG8;
113 enum LIBRAW_EXIFTOOLTAGTYPE_int64s =      LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_SLONG8;
114 enum LIBRAW_EXIFTOOLTAGTYPE_ifd64 =       LibRaw_ExifTagTypes.LIBRAW_EXIFTAG_TYPE_IFD8;
115 
116 enum LIBRAW_LENS_NOT_SET = 0xffffffffffffffffUL;
117 
118 enum LibRaw_whitebalance_code {
119 	Unknown = 0,
120 	Daylight = 1,
121 	Fluorescent = 2,
122 	Tungsten = 3,
123 	Flash = 4,
124 	FineWeather = 9,
125 	Cloudy = 10,
126 	Shade = 11,
127 	FL_D = 12,
128 	FL_N = 13,
129 	FL_W = 14,
130 	FL_WW = 15,
131 	FL_L = 16,
132 	Ill_A = 17,
133 	Ill_B = 18,
134 	Ill_C = 19,
135 	D55 = 20,
136 	D65 = 21,
137 	D75 = 22,
138 	D50 = 23,
139 	StudioTungsten = 24,
140 	Sunset = 64,
141 	Underwater = 65,
142 	FluorescentHigh = 66,
143 	HT_Mercury = 67,
144 	AsShot = 81,
145 	Auto = 82,
146 	Custom = 83,
147 	Auto1 = 85,
148 	Auto2 = 86,
149 	Auto3 = 87,
150 	Auto4 = 88,
151 	Custom1 = 90,
152 	Custom2 = 91,
153 	Custom3 = 92,
154 	Custom4 = 93,
155 	Custom5 = 94,
156 	Custom6 = 95,
157 	PC_Set1 = 96,
158 	PC_Set2 = 97,
159 	PC_Set3 = 98,
160 	PC_Set4 = 99,
161 	PC_Set5 = 100,
162 	Measured = 110,
163 	BW = 120,
164 	Kelvin = 254,
165 	Other = 255,
166 	None = 0xffff
167 }
168 
169 enum LibRaw_MultiExposure_related {
170 	NONE = 0,
171 	SIMPLE = 1,
172 	OVERLAY = 2,
173 	HDR = 3
174 }
175 
176 enum LibRaw_dng_processing {
177 	NONE = 0,
178 	FLOAT = 1,
179 	LINEAR = 2,
180 	DEFLATE = 4,
181 	XTRANS = 8,
182 	OTHER = 16,
183 	_8BIT = 32,
184 	/*LARGERANGE=64,*/ /* more than 16 bit integer */
185 	ALL = FLOAT | LINEAR | XTRANS | _8BIT | OTHER /* |LARGERANGE */,
186 	DEFAULT = FLOAT | LINEAR | DEFLATE | _8BIT
187 }
188 
189 enum LibRaw_runtime_capabilities {
190 	RAWSPEED = 1,
191 	DNGSDK = 2,
192 	GPRSDK = 4,
193 	UNICODEPATHS = 8,
194 	LIBRAW_CAPS_X3FTOOLS = 16,
195 	LIBRAW_CAPS_RPI6BY9 = 32
196 }
197 
198 enum LibRaw_colorspace {
199 	NotFound = 0,
200 	sRGB,
201 	AdobeRGB,
202 	WideGamutRGB,
203 	ProPhotoRGB,
204 	ICC,
205 	Uncalibrated, // Tag 0x0001 InteropIndex containing "R03" + LIBRAW_COLORSPACE_Uncalibrated = Adobe RGB
206 	CameraLinearUniWB,
207 	CameraLinear,
208 	CameraGammaUniWB,
209 	CameraGamma,
210 	MonochromeLinear,
211 	MonochromeGamma,
212 	Unknown = 255
213 }
214 
215 enum LibRaw_cameramaker_index {
216 	Unknown = 0,
217 	Agfa,
218 	Alcatel,
219 	Apple,
220 	Aptina,
221 	AVT,
222 	Baumer,
223 	Broadcom,
224 	Canon,
225 	Casio,
226 	CINE,
227 	Clauss,
228 	Contax,
229 	Creative,
230 	DJI,
231 	DXO,
232 	Epson,
233 	Foculus,
234 	Fujifilm,
235 	Generic,
236 	Gione,
237 	GITUP,
238 	Google,
239 	GoPro,
240 	Hasselblad,
241 	HTC,
242 	I_Mobile,
243 	Imacon,
244 	JK_Imaging,
245 	Kodak,
246 	Konica,
247 	Leaf,
248 	Leica,
249 	Lenovo,
250 	LG,
251 	Logitech,
252 	Mamiya,
253 	Matrix,
254 	Meizu,
255 	Micron,
256 	Minolta,
257 	Motorola,
258 	NGM,
259 	Nikon,
260 	Nokia,
261 	Olympus,
262 	OmniVison,
263 	Panasonic,
264 	Parrot,
265 	Pentax,
266 	PhaseOne,
267 	PhotoControl,
268 	Photron,
269 	Pixelink,
270 	Polaroid,
271 	RED,
272 	Ricoh,
273 	Rollei,
274 	RoverShot,
275 	Samsung,
276 	Sigma,
277 	Sinar,
278 	SMaL,
279 	Sony,
280 	ST_Micro,
281 	THL,
282 	VLUU,
283 	Xiaomi,
284 	XIAOYI,
285 	YI,
286 	Yuneec,
287 	Zeiss,
288 	TheLastOne
289 }
290 
291 enum LibRaw_camera_mounts {
292 	Alpa,
293 	C,              /* C-mount */
294 	Canon_EF_M,
295 	Canon_EF_S,
296 	Canon_EF,
297 	Canon_RF,
298 	Contax_N,
299 	Contax645,
300 	FT,             /* original 4/3 */
301 	mFT,            /* micro 4/3 */
302 	Fuji_GF,        /* Fujifilm GFX cameras, G mount */
303 	Fuji_GX,        /* Fujifilm GX680 */
304 	Fuji_X,
305 	Hasselblad_H,   /* Hasselblad Hn cameras, HC & HCD lenses */
306 	Hasselblad_V,
307 	Hasselblad_XCD, /* Hasselblad Xn cameras, XCD lenses */
308 	Leica_M,        /* Leica rangefinder bayonet */
309 	Leica_R,        /* Leica SLRs, 'R' for reflex */
310 	Leica_S,        /* LIBRAW_FORMAT_LeicaS 'MF' */
311 	Leica_SL,       /* lens, mounts on 'L' throat, FF */
312 	Leica_TL,       /* lens, mounts on 'L' throat, APS-C */
313 	LPS_L,          /* Leica/Panasonic/Sigma camera mount, takes L, SL and TL lenses */
314 	Mamiya67,       /* Mamiya RB67, RZ67 */
315 	Mamiya645,
316 	Minolta_A,
317 	Nikon_CX,       /* used in 'Nikon 1' series */
318 	Nikon_F,
319 	Nikon_Z,
320 	Pentax_645,
321 	Pentax_K,
322 	Pentax_Q,
323 	RicohModule,
324 	Rollei_bayonet, /* Rollei Hy-6: Leaf AFi, Sinar Hy6- models */
325 	Samsung_NX_M,
326 	Samsung_NX,
327 	Sigma_X3F,
328 	Sony_E,
329 	LF,
330 	DigitalBack,
331 	FixedLens,
332 	IL_UM,          /* Interchangeable lens, mount unknown */
333 	TheLastOne
334 }
335 
336 enum LibRaw_camera_formats {
337 	APSC,
338 	FF,
339 	MF,
340 	APSH,
341 	_1INCH,
342 	_1div2p3INCH,  /* 1/2.3" */
343 	_1div1p7INCH,  /* 1/1.7" */
344 	FT,           /* sensor size in FT & mFT cameras */
345 	CROP645,      /* 44x33mm */
346 	LeicaS,       /* 'MF' Leicas */
347 	_645,
348 	_66,
349 	_69,
350 	LF,
351 	Leica_DMR,
352 	_67,
353 	SigmaAPSC,    /* DP1, DP2, SD15, SD14, SD10, SD9 */
354 	SigmaMerrill, /* SD1,  'SD1 Merrill',  'DP1 Merrill',  'DP2 Merrill' */
355 	SigmaAPSH,    /* 'sd Quattro H' */
356 	_3648,         /* DALSA FTF4052C (Mamiya ZD) */
357 	_68,           /* Fujifilm GX680 */
358 	TheLastOne
359 }
360 
361 enum LibRawImageAspects {
362 	UNKNOWN = 0,
363 	_3to2 = 1,
364 	_1to1 = 2,
365 	_4to3 = 3,
366 	_16to9 = 4,
367 	_5to4 = 5,
368 	OTHER = 6
369 }
370 
371 enum LibRaw_lens_focal_types {
372 	UNDEFINED = 0,
373 	PRIME_LENS = 1,
374 	ZOOM_LENS = 2,
375 	ZOOM_LENS_CONSTANT_APERTURE = 3,
376 	ZOOM_LENS_VARIABLE_APERTURE = 4
377 }
378 
379 enum LibRaw_Canon_RecordModes {
380 	UNDEFINED = 0,
381 	JPEG,
382 	CRW_THM,
383 	AVI_THM,
384 	TIF,
385 	TIF_JPEG,
386 	CR2,
387 	CR2_JPEG,
388 	UNKNOWN,
389 	MOV,
390 	MP4,
391 	CRM,
392 	CR3,
393 	CR3_JPEG,
394 	HEIF,
395 	CR3_HEIF,
396 	TheLastOne
397 }
398 
399 enum LibRaw_sony_cameratypes {
400 	DSC = 1,
401 	DSLR = 2,
402 	NEX = 3,
403 	SLT = 4,
404 	ILCE = 5,
405 	ILCA = 6
406 }
407 
408 enum LibRaw_KodakSensors
409 {
410 	UnknownSensor = 0,
411 	M1 = 1,
412 	M15 = 2,
413 	M16 = 3,
414 	M17 = 4,
415 	M2 = 5,
416 	M23 = 6,
417 	M24 = 7,
418 	M3 = 8,
419 	M5 = 9,
420 	M6 = 10,
421 	C14 = 11,
422 	X14 = 12,
423 	M11 = 13
424 }
425 
426 enum LibRaw_HasselbladFormatCodes {
427 	Unknown = 0,
428 	_3FR,
429 	FFF,
430 	Imacon,
431 	HasselbladDNG,
432 	AdobeDNG,
433 	AdobeDNG_fromPhocusDNG
434 }
435 
436 enum LibRaw_processing_options {
437 	SONYARW2_NONE = 0,
438 	SONYARW2_BASEONLY = 1,
439 	SONYARW2_DELTAONLY = 1 << 1,
440 	SONYARW2_DELTAZEROBASE = 1 << 2,
441 	SONYARW2_DELTATOVALUE = 1 << 3,
442 	SONYARW2_ALLFLAGS = SONYARW2_BASEONLY + SONYARW2_DELTAONLY +
443 		SONYARW2_DELTAZEROBASE + SONYARW2_DELTATOVALUE,
444 	DP2Q_INTERPOLATERG = 1 << 4,
445 	DP2Q_INTERPOLATEAF = 1 << 5,
446 	PENTAX_PS_ALLFRAMES = 1 << 6,
447 	CONVERTFLOAT_TO_INT = 1 << 7,
448 	SRAW_NO_RGB = 1 << 8,
449 	SRAW_NO_INTERPOLATE = 1 << 9,
450 	LIBRAW_PROCESSING_ARQ_SKIP_CHANNEL_SWAP = 1 << 10,
451 	NO_ROTATE_FOR_KODAK_THUMBNAILS = 1 << 11,
452 	USE_DNG_DEFAULT_CROP = 1 << 12,
453 	USE_PPM16_THUMBS = 1 << 13,
454 	SKIP_MAKERNOTES = 1 << 14,
455 	DONT_CHECK_DNG_ILLUMINANT = 1 << 15,
456 	DNGSDK_ZEROCOPY = 1 << 16,
457 	ZEROFILTERS_FOR_MONOCHROMETIFFS = 1 << 17,
458 	DNG_ADD_ENHANCED = 1 << 18,
459 	DNG_ADD_PREVIEWS = 1 << 19,
460 	DNG_PREFER_LARGEST_IMAGE = 1 << 20,
461 	DNG_STAGE2 = 1 << 21,
462 	DNG_STAGE3 = 1 << 22,
463 	DNG_ALLOWSIZECHANGE = 1 << 23,
464 	DNG_DISABLEWBADJUST = 1 << 24,
465 	PROVIDE_NONSTANDARD_WB = 1 << 25,
466 	CAMERAWB_FALLBACK_TO_DAYLIGHT = 1 << 26
467 }
468 
469 enum LibRaw_decoder_flags {
470 	HASCURVE = 1 << 4,
471 	SONYARW2 = 1 << 5,
472 	TRYRAWSPEED = 1 << 6,
473 	OWNALLOC = 1 << 7,
474 	FIXEDMAXC = 1 << 8,
475 	ADOBECOPYPIXEL = 1 << 9,
476 	LEGACY_WITH_MARGINS = 1 << 10,
477 	_3CHANNEL = 1 << 11,
478 	SINAR4SHOT = 1 << 11,
479 	FLATDATA = 1 << 12,
480 	FLAT_BG2_SWAPPED = 1<<13,
481 	NOTSET = 1 << 15
482 }
483 
484 enum LIBRAW_XTRANS = 9;
485 
486 enum LibRaw_constructor_flags {
487 	NONE = 0,
488 	NO_MEMERR_CALLBACK = 1,
489 	NO_DATAERR_CALLBACK = 1 << 1
490 }
491 
492 enum LibRaw_warnings {
493 	NONE = 0,
494 	BAD_CAMERA_WB = 1 << 2,
495 	NO_METADATA = 1 << 3,
496 	NO_JPEGLIB = 1 << 4,
497 	NO_EMBEDDED_PROFILE = 1 << 5,
498 	NO_INPUT_PROFILE = 1 << 6,
499 	BAD_OUTPUT_PROFILE = 1 << 7,
500 	NO_BADPIXELMAP = 1 << 8,
501 	BAD_DARKFRAME_FILE = 1 << 9,
502 	BAD_DARKFRAME_DIM = 1 << 10,
503 	NO_JASPER = 1 << 11,
504 	RAWSPEED_PROBLEM = 1 << 12,
505 	RAWSPEED_UNSUPPORTED = 1 << 13,
506 	RAWSPEED_PROCESSED = 1 << 14,
507 	FALLBACK_TO_AHD = 1 << 15,
508 	PARSEFUJI_PROCESSED = 1 << 16,
509 	DNGSDK_PROCESSED = 1 << 17,
510 	DNG_IMAGES_REORDERED = 1 << 18,
511 	DNG_STAGE2_APPLIED = 1 << 19,
512 	DNG_STAGE3_APPLIED = 1 << 20,
513 }
514 
515 enum LibRaw_exceptions {
516 	NONE = 0,
517 	ALLOC = 1,
518 	DECODE_RAW = 2,
519 	DECODE_JPEG = 3,
520 	IO_EOF = 4,
521 	IO_CORRUPT = 5,
522 	CANCELLED_BY_CALLBACK = 6,
523 	BAD_CROP = 7,
524 	IO_BADFILE = 8,
525 	DECODE_JPEG2000 = 9,
526 	TOOBIG = 10,
527 	MEMPOOL = 11
528 }
529 
530 enum LibRaw_progress {
531 	START = 0,
532 	OPEN = 1,
533 	IDENTIFY = 1 << 1,
534 	SIZE_ADJUST = 1 << 2,
535 	LOAD_RAW = 1 << 3,
536 	RAW2_IMAGE = 1 << 4,
537 	REMOVE_ZEROES = 1 << 5,
538 	BAD_PIXELS = 1 << 6,
539 	DARK_FRAME = 1 << 7,
540 	FOVEON_INTERPOLATE = 1 << 8,
541 	SCALE_COLORS = 1 << 9,
542 	PRE_INTERPOLATE = 1 << 10,
543 	INTERPOLATE = 1 << 11,
544 	MIX_GREEN = 1 << 12,
545 	MEDIAN_FILTER = 1 << 13,
546 	HIGHLIGHTS = 1 << 14,
547 	FUJI_ROTATE = 1 << 15,
548 	FLIP = 1 << 16,
549 	APPLY_PROFILE = 1 << 17,
550 	CONVERT_RGB = 1 << 18,
551 	STRETCH = 1 << 19,
552 	/* reserved */
553 	STAGE20 = 1 << 20,
554 	STAGE21 = 1 << 21,
555 	STAGE22 = 1 << 22,
556 	STAGE23 = 1 << 23,
557 	STAGE24 = 1 << 24,
558 	STAGE25 = 1 << 25,
559 	STAGE26 = 1 << 26,
560 	STAGE27 = 1 << 27,
561 
562 	THUMB_LOAD = 1 << 28,
563 	TRESERVED1 = 1 << 29,
564 	TRESERVED2 = 1 << 30
565 }
566 enum LIBRAW_PROGRESS_THUMB_MASK = 0x0fffffff;
567 
568 enum LibRaw_errors {
569 	SUCCESS = 0,
570 	UNSPECIFIED_ERROR = -1,
571 	FILE_UNSUPPORTED = -2,
572 	REQUEST_FOR_NONEXISTENT_IMAGE = -3,
573 	OUT_OF_ORDER_CALL = -4,
574 	NO_THUMBNAIL = -5,
575 	UNSUPPORTED_THUMBNAIL = -6,
576 	INPUT_CLOSED = -7,
577 	NOT_IMPLEMENTED = -8,
578 	UNSUFFICIENT_MEMORY = -100007,
579 	DATA_ERROR = -100008,
580 	IO_ERROR = -100009,
581 	CANCELLED_BY_CALLBACK = -100010,
582 	BAD_CROP = -100011,
583 	TOO_BIG = -100012,
584 	MEMPOOL_OVERFLOW = -100013
585 }
586 
587 auto LIBRAW_FATAL_ERROR(E)(E ec) { return ec < -100000; }
588 
589 enum LibRaw_thumbnail_formats {
590 	UNKNOWN = 0,
591 	JPEG = 1,
592 	BITMAP = 2,
593 	BITMAP16 = 3,
594 	LAYER = 4,
595 	ROLLEI = 5
596 }
597 
598 enum LibRaw_image_formats {
599 	JPEG = 1,
600 	BITMAP = 2
601 }