PageRenderTime 16ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/FreeImage/Source/LibRawLite/libraw/libraw_const.h

https://bitbucket.org/cabalistic/ogredeps/
C++ Header | 162 lines | 126 code | 16 blank | 20 comment | 0 complexity | 2cf5d3e3e7a7e380cfcdc88deeda1346 MD5 | raw file
  1/* -*- C++ -*-
  2 * File: libraw_const.h
  3 * Copyright 2008-2010 LibRaw LLC (info@libraw.org)
  4 * Created: Sat Mar  8 , 2008
  5 *
  6 * LibRaw error codes
  7LibRaw is free software; you can redistribute it and/or modify
  8it under the terms of the one of three licenses as you choose:
  9
 101. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
 11   (See file LICENSE.LGPL provided in LibRaw distribution archive for details).
 12
 132. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
 14   (See file LICENSE.CDDL provided in LibRaw distribution archive for details).
 15
 163. LibRaw Software License 27032010
 17   (See file LICENSE.LibRaw.pdf provided in LibRaw distribution archive for details).
 18
 19 */
 20
 21#ifndef _LIBRAW_ERRORS_H
 22#define _LIBRAW_ERRORS_H
 23
 24#define LIBRAW_DEFAULT_ADJUST_MAXIMUM_THRESHOLD 0.75
 25#define LIBRAW_DEFAULT_AUTO_BRIGHTNESS_THRESHOLD 0.01
 26
 27enum LibRaw_decoder_flags
 28{
 29    LIBRAW_DECODER_LEGACY = 1,      
 30    LIBRAW_DECODER_FLATFIELD = 1<<1,
 31    LIBRAW_DECODER_4COMPONENT = 1<<2,
 32    LIBRAW_DECODER_USEBAYER2 = 1<<3,
 33    LIBRAW_DECODER_HASCURVE = 1<<4,
 34    LIBRAW_DECODER_NOTSET = 1<<15
 35};
 36
 37
 38enum LibRaw_constructor_flags
 39{
 40    LIBRAW_OPTIONS_NONE         =0,
 41    LIBRAW_OPIONS_NO_MEMERR_CALLBACK=1,
 42    LIBRAW_OPIONS_NO_DATAERR_CALLBACK=1<<1
 43};
 44
 45enum LibRaw_warnings
 46{
 47    LIBRAW_WARN_NONE            =0,
 48    LIBRAW_WARN_FOVEON_NOMATRIX =1,
 49    LIBRAW_WARN_FOVEON_INVALIDWB =1<<1,
 50    LIBRAW_WARN_BAD_CAMERA_WB   =1<<2,
 51    LIBRAW_WARN_NO_METADATA     =1<<3,
 52    LIBRAW_WARN_NO_JPEGLIB     = 1<<4,
 53    LIBRAW_WARN_NO_EMBEDDED_PROFILE = 1<<5,
 54    LIBRAW_WARN_NO_INPUT_PROFILE = 1<<6,
 55    LIBRAW_WARN_BAD_OUTPUT_PROFILE= 1<<7,
 56    LIBRAW_WARN_NO_BADPIXELMAP=1<<8,
 57    LIBRAW_WARN_BAD_DARKFRAME_FILE=1<<9,
 58    LIBRAW_WARN_BAD_DARKFRAME_DIM=1<<10,
 59    LIBRAW_WARN_NO_JASPER = 1<<11
 60};
 61
 62enum LibRaw_exceptions
 63{
 64    LIBRAW_EXCEPTION_NONE       =0,
 65    LIBRAW_EXCEPTION_ALLOC      =1,
 66    LIBRAW_EXCEPTION_DECODE_RAW =2,
 67    LIBRAW_EXCEPTION_DECODE_JPEG=3,
 68    LIBRAW_EXCEPTION_IO_EOF     =4,
 69    LIBRAW_EXCEPTION_IO_CORRUPT =5,
 70    LIBRAW_EXCEPTION_CANCELLED_BY_CALLBACK=6,
 71    LIBRAW_EXCEPTION_BAD_CROP =7,
 72    LIBRAW_EXCEPTION_IO_BADFILE =8,
 73    LIBRAW_EXCEPTION_DECODE_JPEG2000=9
 74};
 75
 76
 77enum LibRaw_colorstate
 78{
 79    LIBRAW_COLORSTATE_UNKNOWN   =0,
 80    LIBRAW_COLORSTATE_INIT      =1,
 81    LIBRAW_COLORSTATE_CONST     =2,
 82    LIBRAW_COLORSTATE_LOADED    =3,
 83    LIBRAW_COLORSTATE_CALCULATED=4,
 84    LIBRAW_COLORSTATE_RESERVED1 =5,
 85    LIBRAW_COLORSTATE_RESERVED2 =6,
 86    LIBRAW_COLORSTATE_RESERVED3 =7
 87};
 88
 89enum LibRaw_progress
 90{
 91    LIBRAW_PROGRESS_START               = 0,
 92    LIBRAW_PROGRESS_OPEN                = 1,
 93    LIBRAW_PROGRESS_IDENTIFY            = 1<<1,
 94    LIBRAW_PROGRESS_SIZE_ADJUST         = 1<<2,
 95    LIBRAW_PROGRESS_LOAD_RAW            = 1<<3,
 96    LIBRAW_PROGRESS_REMOVE_ZEROES       = 1<<4,
 97    LIBRAW_PROGRESS_BAD_PIXELS          = 1<<5,
 98    LIBRAW_PROGRESS_DARK_FRAME          = 1<<6,
 99    LIBRAW_PROGRESS_FOVEON_INTERPOLATE  = 1<<7,
100    LIBRAW_PROGRESS_SCALE_COLORS        = 1<<8,
101    LIBRAW_PROGRESS_PRE_INTERPOLATE     = 1<<9,
102    LIBRAW_PROGRESS_INTERPOLATE         = 1<<10,
103    LIBRAW_PROGRESS_MIX_GREEN           = 1<<11,
104    LIBRAW_PROGRESS_MEDIAN_FILTER       = 1<<12,
105    LIBRAW_PROGRESS_HIGHLIGHTS          = 1<<13,
106    LIBRAW_PROGRESS_FUJI_ROTATE         = 1<<14,
107    LIBRAW_PROGRESS_FLIP                = 1<<15,
108    LIBRAW_PROGRESS_APPLY_PROFILE       = 1<<16,
109    LIBRAW_PROGRESS_CONVERT_RGB         = 1<<17,
110    LIBRAW_PROGRESS_STRETCH             = 1<<18,
111/* reserved */
112    LIBRAW_PROGRESS_STAGE19             = 1<<19,
113    LIBRAW_PROGRESS_STAGE20             = 1<<20,
114    LIBRAW_PROGRESS_STAGE21             = 1<<21,
115    LIBRAW_PROGRESS_STAGE22             = 1<<22,
116    LIBRAW_PROGRESS_STAGE23             = 1<<23,
117    LIBRAW_PROGRESS_STAGE24             = 1<<24,
118    LIBRAW_PROGRESS_STAGE25             = 1<<25,
119    LIBRAW_PROGRESS_STAGE26             = 1<<26,
120    LIBRAW_PROGRESS_STAGE27             = 1<<27,
121
122    LIBRAW_PROGRESS_THUMB_LOAD          = 1<<28,
123    LIBRAW_PROGRESS_TRESERVED1          = 1<<29,
124    LIBRAW_PROGRESS_TRESERVED2          = 1<<30,
125    LIBRAW_PROGRESS_TRESERVED3          = 1<<31
126};
127#define LIBRAW_PROGRESS_THUMB_MASK 0x0fffffff
128
129enum LibRaw_errors
130{
131    LIBRAW_SUCCESS = 0,
132    LIBRAW_UNSPECIFIED_ERROR=-1,
133    LIBRAW_FILE_UNSUPPORTED = -2,
134    LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE=-3,
135    LIBRAW_OUT_OF_ORDER_CALL=-4,
136    LIBRAW_NO_THUMBNAIL=-5,
137    LIBRAW_UNSUPPORTED_THUMBNAIL=-6,
138    LIBRAW_UNSUFFICIENT_MEMORY=-100007,
139    LIBRAW_DATA_ERROR=-100008,
140    LIBRAW_IO_ERROR=-100009,
141    LIBRAW_CANCELLED_BY_CALLBACK=-100010,
142    LIBRAW_BAD_CROP=-100011
143};
144
145#define LIBRAW_FATAL_ERROR(ec) ((ec)<-100000)
146
147enum LibRaw_thumbnail_formats
148{
149    LIBRAW_THUMBNAIL_UNKNOWN=0,
150    LIBRAW_THUMBNAIL_JPEG=1,
151    LIBRAW_THUMBNAIL_BITMAP=2,
152    LIBRAW_THUMBNAIL_LAYER=4,
153    LIBRAW_THUMBNAIL_ROLLEI=5
154};
155
156enum LibRaw_image_formats
157{
158    LIBRAW_IMAGE_JPEG=1,
159    LIBRAW_IMAGE_BITMAP=2
160};
161
162#endif