DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_read_image.hGo to the documentation of this file.00001 /*****************************************************************************/ 00002 // Copyright 2006-2008 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/workarea/stern/camera_raw/dng_sdk/source/dng_read_image.h#5 $ */ 00010 /* $DateTime: 2008/01/04 04:09:05 $ */ 00011 /* $Change: 408965 $ */ 00012 /* $Author: stern $ */ 00013 00018 /*****************************************************************************/ 00019 00020 #ifndef __dng_read_image__ 00021 #define __dng_read_image__ 00022 00023 /*****************************************************************************/ 00024 00025 #include "dng_auto_ptr.h" 00026 #include "dng_classes.h" 00027 #include "dng_image.h" 00028 #include "dng_memory.h" 00029 #include "dng_types.h" 00030 00031 /*****************************************************************************/ 00032 00033 class dng_row_interleaved_image: public dng_image 00034 { 00035 00036 private: 00037 00038 dng_image &fImage; 00039 00040 uint32 fFactor; 00041 00042 public: 00043 00044 dng_row_interleaved_image (dng_image &image, 00045 uint32 factor); 00046 00047 virtual void DoGet (dng_pixel_buffer &buffer) const; 00048 00049 virtual void DoPut (const dng_pixel_buffer &buffer); 00050 00051 private: 00052 00053 int32 MapRow (int32 row) const; 00054 00055 }; 00056 00057 /*****************************************************************************/ 00058 00062 00063 class dng_read_image 00064 { 00065 00066 protected: 00067 00068 enum 00069 { 00070 00071 // Target size for buffer used to copy data to the image. 00072 00073 kImageBufferSize = 128 * 1024 00074 00075 }; 00076 00077 AutoPtr<dng_memory_block> fCompressedBuffer; 00078 00079 AutoPtr<dng_memory_block> fUncompressedBuffer; 00080 00081 AutoPtr<dng_memory_block> fSubTileBlockBuffer; 00082 00083 public: 00084 00085 dng_read_image (); 00086 00087 virtual ~dng_read_image (); 00088 00091 00092 virtual bool CanRead (const dng_ifd &ifd); 00093 00099 00100 virtual void Read (dng_host &host, 00101 const dng_ifd &ifd, 00102 dng_stream &stream, 00103 dng_image &image); 00104 00105 protected: 00106 00107 virtual bool ReadUncompressed (dng_host &host, 00108 const dng_ifd &ifd, 00109 dng_stream &stream, 00110 dng_image &image, 00111 const dng_rect &tileArea, 00112 uint32 plane, 00113 uint32 planes); 00114 00115 virtual bool ReadBaselineJPEG (dng_host &host, 00116 const dng_ifd &ifd, 00117 dng_stream &stream, 00118 dng_image &image, 00119 const dng_rect &tileArea, 00120 uint32 plane, 00121 uint32 planes, 00122 uint32 tileByteCount); 00123 00124 virtual bool ReadLosslessJPEG (dng_host &host, 00125 const dng_ifd &ifd, 00126 dng_stream &stream, 00127 dng_image &image, 00128 const dng_rect &tileArea, 00129 uint32 plane, 00130 uint32 planes, 00131 uint32 tileByteCount); 00132 00133 virtual bool CanReadTile (const dng_ifd &ifd); 00134 00135 virtual bool NeedsCompressedBuffer (const dng_ifd &ifd); 00136 00137 virtual void ReadTile (dng_host &host, 00138 const dng_ifd &ifd, 00139 dng_stream &stream, 00140 dng_image &image, 00141 const dng_rect &tileArea, 00142 uint32 plane, 00143 uint32 planes, 00144 uint32 tileByteCount); 00145 00146 }; 00147 00148 /*****************************************************************************/ 00149 00150 #endif 00151 00152 /*****************************************************************************/ |