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_preview.h00001 /*****************************************************************************/ 00002 // Copyright 2007 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_preview.h#2 $ */ 00010 /* $DateTime: 2007/12/24 13:18:53 $ */ 00011 /* $Change: 408196 $ */ 00012 /* $Author: stern $ */ 00013 00014 /*****************************************************************************/ 00015 00016 #ifndef __dng_preview__ 00017 #define __dng_preview__ 00018 00019 /*****************************************************************************/ 00020 00021 #include "dng_auto_ptr.h" 00022 #include "dng_classes.h" 00023 #include "dng_ifd.h" 00024 #include "dng_point.h" 00025 #include "dng_sdk_limits.h" 00026 00027 /*****************************************************************************/ 00028 00029 class dng_preview 00030 { 00031 00032 public: 00033 00034 dng_preview_info fInfo; 00035 00036 protected: 00037 00038 dng_preview (); 00039 00040 public: 00041 00042 virtual ~dng_preview (); 00043 00044 virtual dng_basic_tag_set * AddTagSet (dng_tiff_directory &directory) const = 0; 00045 00046 virtual void WriteData (dng_host &host, 00047 dng_image_writer &writer, 00048 dng_basic_tag_set &basic, 00049 dng_stream &stream) const = 0; 00050 00051 }; 00052 00053 /*****************************************************************************/ 00054 00055 class dng_image_preview: public dng_preview 00056 { 00057 00058 public: 00059 00060 AutoPtr<dng_image> fImage; 00061 00062 private: 00063 00064 mutable dng_ifd fIFD; 00065 00066 public: 00067 00068 dng_image_preview (); 00069 00070 virtual ~dng_image_preview (); 00071 00072 virtual dng_basic_tag_set * AddTagSet (dng_tiff_directory &directory) const; 00073 00074 virtual void WriteData (dng_host &host, 00075 dng_image_writer &writer, 00076 dng_basic_tag_set &basic, 00077 dng_stream &stream) const; 00078 00079 private: 00080 00081 // Hidden copy constructor and assignment operator. 00082 00083 dng_image_preview (const dng_image_preview &preview); 00084 00085 dng_image_preview & operator= (const dng_image_preview &preview); 00086 00087 }; 00088 00089 /*****************************************************************************/ 00090 00091 class dng_jpeg_preview: public dng_preview 00092 { 00093 00094 public: 00095 00096 dng_point fPreviewSize; 00097 00098 uint16 fPhotometricInterpretation; 00099 00100 dng_point fYCbCrSubSampling; 00101 00102 uint16 fYCbCrPositioning; 00103 00104 AutoPtr<dng_memory_block> fCompressedData; 00105 00106 public: 00107 00108 dng_jpeg_preview (); 00109 00110 virtual ~dng_jpeg_preview (); 00111 00112 virtual dng_basic_tag_set * AddTagSet (dng_tiff_directory &directory) const; 00113 00114 virtual void WriteData (dng_host &host, 00115 dng_image_writer &writer, 00116 dng_basic_tag_set &basic, 00117 dng_stream &stream) const; 00118 00119 void SpoolAdobeThumbnail (dng_stream &stream) const; 00120 00121 private: 00122 00123 // Hidden copy constructor and assignment operator. 00124 00125 dng_jpeg_preview (const dng_jpeg_preview &preview); 00126 00127 dng_jpeg_preview & operator= (const dng_jpeg_preview &preview); 00128 00129 }; 00130 00131 /*****************************************************************************/ 00132 00133 class dng_preview_list 00134 { 00135 00136 private: 00137 00138 uint32 fCount; 00139 00140 AutoPtr<dng_preview> fPreview [kMaxDNGPreviews]; 00141 00142 public: 00143 00144 dng_preview_list (); 00145 00146 ~dng_preview_list (); 00147 00148 uint32 Count () const 00149 { 00150 return fCount; 00151 } 00152 00153 const dng_preview & Preview (uint32 index) const 00154 { 00155 return *(fPreview [index]); 00156 } 00157 00158 void Append (AutoPtr<dng_preview> &preview); 00159 00160 }; 00161 00162 /*****************************************************************************/ 00163 00164 #endif 00165 00166 /*****************************************************************************/ |