|
dng_image_writer Class ReferenceSupport for writing dng_image or dng_negative instances to a dng_stream in TIFF or DNG format.
More...
#include <dng_image_writer.h>
List of all members.
|
Public Member Functions |
virtual void | WriteImage (dng_host &host, const dng_ifd &ifd, dng_basic_tag_set &basic, dng_stream &stream, const dng_image &image, uint32 fakeChannels=1) |
virtual void | WriteTIFF (dng_host &host, dng_stream &stream, const dng_image &image, uint32 photometricInterpretation=piBlackIsZero, uint32 compression=ccUncompressed, dng_negative *negative=NULL, const dng_color_space *space=NULL, const dng_resolution *resolution=NULL, const dng_jpeg_preview *thumbnail=NULL, const dng_memory_block *imageResources=NULL) |
virtual void | WriteTIFFWithProfile (dng_host &host, dng_stream &stream, const dng_image &image, uint32 photometricInterpretation=piBlackIsZero, uint32 compression=ccUncompressed, dng_negative *negative=NULL, const void *profileData=NULL, uint32 profileSize=0, const dng_resolution *resolution=NULL, const dng_jpeg_preview *thumbnail=NULL, const dng_memory_block *imageResources=NULL) |
virtual void | WriteDNG (dng_host &host, dng_stream &stream, const dng_negative &negative, const dng_image_preview &thumbnail, uint32 compression=ccJPEG, const dng_preview_list *previewList=NULL) |
Protected Types |
enum | { kImageBufferSize = 128 * 1024
} |
Protected Member Functions |
virtual uint32 | CompressedBufferSize (const dng_ifd &ifd, uint32 uncompressedSize) |
virtual void | EncodePredictor (dng_host &host, const dng_ifd &ifd, dng_pixel_buffer &buffer) |
virtual void | ByteSwapBuffer (dng_host &host, dng_pixel_buffer &buffer) |
void | ReorderSubTileBlocks (const dng_ifd &ifd, dng_pixel_buffer &buffer) |
virtual void | WriteData (dng_host &host, const dng_ifd &ifd, dng_stream &stream, dng_pixel_buffer &buffer) |
virtual void | WriteTile (dng_host &host, const dng_ifd &ifd, dng_stream &stream, const dng_image &image, const dng_rect &tileArea, uint32 fakeChannels) |
Protected Attributes |
AutoPtr< dng_memory_block > | fCompressedBuffer |
AutoPtr< dng_memory_block > | fUncompressedBuffer |
AutoPtr< dng_memory_block > | fSubTileBlockBuffer |
Detailed Description
Support for writing dng_image or dng_negative instances to a dng_stream in TIFF or DNG format.
Member Function Documentation
void dng_image_writer::WriteDNG |
( |
dng_host & |
host, |
|
|
dng_stream & |
stream, |
|
|
const dng_negative & |
negative, |
|
|
const dng_image_preview & |
thumbnail, |
|
|
uint32 |
compression = ccJPEG , |
|
|
const dng_preview_list * |
previewList = NULL | |
|
) |
| | [virtual] |
Write a dng_image to a dng_stream in DNG format. - Parameters:
-
| host | Host interface used for progress updates, abort testing, buffer allocation, etc. |
| stream | The dng_stream on which to write the TIFF. |
| negative | The image data and metadata (EXIF, IPTC, XMP) to be written. |
| thumbnail | Thumbanil image. Must be provided. |
| compression | Either ccUncompressed or ccJPEG for lossless JPEG. |
| previewList | List of previews (not counting thumbnail) to write to the file. Defaults to empty. |
References dng_negative::AntiAliasStrength(), dng_negative::BaselineExposureR(), dng_negative::BaselineNoiseR(), dng_negative::BaselineSharpnessR(), dng_negative::BestQualityScale(), dng_stream::BigEndian(), dng_memory_data::Buffer_uint32(), dng_negative::ChromaBlurRadius(), dng_negative::DefaultCropOriginH(), dng_negative::DefaultCropOriginV(), dng_negative::DefaultCropSizeH(), dng_negative::DefaultCropSizeV(), dng_negative::DefaultScaleH(), dng_negative::DefaultScaleV(), dng_mosaic_info::fCFALayout, dng_mosaic_info::fCFAPatternSize, dng_linearization_info::fLinearizationTable, dng_stream::Flush(), AutoPtr< T >::Get(), dng_mosaic_info::IsColorFilterArray(), dng_negative::IsMonochrome(), dng_fingerprint::IsValid(), kMaxDNGPreviews, dng_stream::Length(), dng_negative::LocalName(), dng_negative::ModelName(), dng_negative::NoiseProfile(), dng_negative::NoiseReductionApplied(), dng_negative::Orientation(), dng_stream::Position(), dng_stream::Put_uint16(), dng_stream::Put_uint32(), AutoPtr< T >::Reset(), dng_stream::SetLength(), dng_stream::SetWritePosition(), dng_negative::ShadowScaleR(), ThrowImageTooBigDNG(), and ThrowProgramError().
void dng_image_writer::WriteTIFF |
( |
dng_host & |
host, |
|
|
dng_stream & |
stream, |
|
|
const dng_image & |
image, |
|
|
uint32 |
photometricInterpretation = piBlackIsZero , |
|
|
uint32 |
compression = ccUncompressed , |
|
|
dng_negative * |
negative = NULL , |
|
|
const dng_color_space * |
space = NULL , |
|
|
const dng_resolution * |
resolution = NULL , |
|
|
const dng_jpeg_preview * |
thumbnail = NULL , |
|
|
const dng_memory_block * |
imageResources = NULL | |
|
) |
| | [virtual] |
Write a dng_image to a dng_stream in TIFF format. - Parameters:
-
| host | Host interface used for progress updates, abort testing, buffer allocation, etc. |
| stream | The dng_stream on which to write the TIFF. |
| image | The actual image data to be written. |
| photometricInterpretation | Either piBlackIsZero for monochrome or piRGB for RGB images. |
| compression | Must be ccUncompressed. |
| negative | If non-NULL, EXIF, IPTC, and XMP metadata from this negative is written to TIFF. |
| space | If non-null and color space has an ICC profile, TIFF will be tagged with this profile. No color space conversion of image data occurs. |
| resolution | If non-NULL, TIFF will be tagged with this resolution. |
| thumbnail | If non-NULL, will be stored in TIFF as preview image. |
| imageResources | If non-NULL, will image resources be stored in TIFF as well. |
References dng_color_space::ICCProfile(), and WriteTIFFWithProfile().
void dng_image_writer::WriteTIFFWithProfile |
( |
dng_host & |
host, |
|
|
dng_stream & |
stream, |
|
|
const dng_image & |
image, |
|
|
uint32 |
photometricInterpretation = piBlackIsZero , |
|
|
uint32 |
compression = ccUncompressed , |
|
|
dng_negative * |
negative = NULL , |
|
|
const void * |
profileData = NULL , |
|
|
uint32 |
profileSize = 0 , |
|
|
const dng_resolution * |
resolution = NULL , |
|
|
const dng_jpeg_preview * |
thumbnail = NULL , |
|
|
const dng_memory_block * |
imageResources = NULL | |
|
) |
| | [virtual] |
Write a dng_image to a dng_stream in TIFF format. - Parameters:
-
| host | Host interface used for progress updates, abort testing, buffer allocation, etc. |
| stream | The dng_stream on which to write the TIFF. |
| image | The actual image data to be written. |
| photometricInterpretation | Either piBlackIsZero for monochrome or piRGB for RGB images. |
| compression | Must be ccUncompressed. |
| negative | If non-NULL, EXIF, IPTC, and XMP metadata from this negative is written to TIFF. |
| profileData | If non-null, TIFF will be tagged with this profile. No color space conversion of image data occurs. |
| profileSize | The size for the profile data. |
| resolution | If non-NULL, TIFF will be tagged with this resolution. |
| thumbnail | If non-NULL, will be stored in TIFF as preview image. |
| imageResources | If non-NULL, will image resources be stored in TIFF as well. |
References dng_stream::BigEndian(), dng_image::Bounds(), dng_stream::Flush(), AutoPtr< T >::Get(), dng_stream::Length(), dng_image::PixelType(), dng_image::Planes(), dng_stream::Position(), dng_stream::Put_uint16(), dng_stream::Put_uint32(), AutoPtr< T >::Reset(), dng_stream::SetLength(), dng_stream::SetWritePosition(), dng_image::Size(), and ThrowImageTooBigTIFF().
Referenced by WriteTIFF().
The documentation for this class was generated from the following files:
|