dng_host Class ReferenceThe main class for communication between the application and the DNG SDK. Used to customize memory allocation and other behaviors. More...
Detailed DescriptionThe main class for communication between the application and the DNG SDK. Used to customize memory allocation and other behaviors.dng_host allows setting parameters for the DNG conversion, mediates callback style interactions between the host application and the DNG SDK, and allows controlling certain internal behavior of the SDK such as memory allocation. Many applications will be able to use the default implementation of dng_host by just setting the dng_memory_allocator and dng_abort_sniffer in the constructor. More complex interactions will require deriving a class from dng_host. Multiple dng_host objects can be allocated in a single process. This may be useful for DNG processing on separate threads. (Distinct dng_host objects are completely threadsafe for read/write. The application is responsible for establishing mutual exclusion for read/write access to a single dng_host object if it is used in multiple threads.) Constructor & Destructor Documentation
Allocate a dng_host object, possiblly with custom allocator and sniffer.
Member Function Documentation
Alocate a new dng_memory_block using the host's memory allocator. Uses the Allocator() property of host to allocate a new block of memory. Will call ThrowMemoryFull if block cannot be allocated.
References dng_memory_allocator::Allocate(), and Allocator(). Referenced by dng_mosaic_info::InterpolateGeneric().
Check for pending abort. Should call ThrowUserCanceled if an abort is pending. References Sniffer(), and dng_abort_sniffer::SniffForAbort(). Referenced by dng_mosaic_info::InterpolateGeneric().
Setter for flag determining whether all XMP metadata should be parsed. Defaults to true. One might not want metadata when doing a quick check to see if a file is readable.
Setter for flag determining whether DNG image data is needed. Defaults to true. Image data might not be needed for applications which only manipulate metadata.
Setter for flag determining whether image should be preview quality, or full quality.
Getter for flag determining whether image should be preview quality. Preview quality images may be rendered more quickly. Current DNG SDK does not change rendering behavior based on this flag, but derived versions may use this getter to choose between a slower more accurate path and a faster "good enough for preview" one. Data produce with ForPreview set to true should not be written back to a DNG file, except as a preview image.
Setter for the minimum preview size.
Referenced by ValidateSizes().
Setter for the preferred preview size.
Referenced by ValidateSizes().
Setter for the maximum preview size.
Setter for the cropping factor.
Setter for flag determining whether to keep stage 1, unprocessed raw data, after processing all stages.
Getter for flag determining whether to keep stage 1, unprocessed raw data, after processing all stages.
Setter for flag determining whether to keep stage 2, linearized, tone curve processed data, after processing all stages.
Getter for flag determining whether to keep stage 2, linearized, tone curve processed data, after processing all stages.
Setter for flag determining whether DNG private data will be kept.
Setter for flag determining whether to keep original RAW file data.
Determine if an error is the result of a temporary, but planned-for occurence such as user cancellation or memory exhaustion. This method is sometimes used to determine whether to try and continue processing a DNG file despite errors in the file format, etc. In such cases, processing will be continued if IsTransientError returns false. This is so that user cancellation and memory exhaustion always terminate processing.
General top-level botttleneck for image processing tasks. Default implementation calls dng_area_task::PerformAreaTask method on task. Can be overridden in derived classes to support multiprocessing, for example.
References Allocator(), dng_area_task::Perform(), and Sniffer(). Referenced by dng_mosaic_info::InterpolateFast(), dng_linearization_info::Linearize(), and dng_render::Render().
Factory method for dng_exif class. Can be used to customize allocation or to ensure a derived class is used instead of dng_exif. References ThrowMemoryFull(). Referenced by dng_info::Parse().
Factory method for dng_shared class. Can be used to customize allocation or to ensure a derived class is used instead of dng_shared. References ThrowMemoryFull(). Referenced by dng_info::Parse().
Factory method for dng_ifd class. Can be used to customize allocation or to ensure a derived class is used instead of dng_ifd. References ThrowMemoryFull(). Referenced by dng_info::Parse().
Factory method for dng_negative class. Can be used to customize allocation or to ensure a derived class is used instead of dng_negative. References Allocator().
Factor method for dng_image class. Can be used to customize allocation or to ensure a derived class is used instead of dng_simple_image. References Allocator(), and ThrowMemoryFull(). Referenced by dng_render::Render().
The documentation for this class was generated from the following files:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
