libpgf
6.12.24
PGF - Progressive Graphics File
|
#include <PGFimage.h>
Public Member Functions | |
*Close PGF image after opening and reading *Destructor calls this method during destruction *virtual void | Close () |
*Destroy internal data structures *Destructor calls this method during destruction *virtual void | Destroy () |
*Returns true if the PGF has been opened and not closed *bool | IsOpen () const |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in numbered between and | Levels ()-1.*Each level can be seen as a single image |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different | size (width, height).*The image size at level i is double the size(width |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer *param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | Read (int level=0, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Read a rectangular region of interest of a PGF image at current stream position *The origin of the coordinate axis is the top left corner of the image *All coordinates are measured in pixels *It might throw an IOException *param rect[inout] Rectangular region of | interest (ROI).The rect might be cropped.*@param level[0 |
*Read a rectangular region of interest of a PGF image at current stream position *The origin of the coordinate axis is the top left corner of the image *All coordinates are measured in pixels *It might throw an IOException *param rect[inout] Rectangular region of nLevels The image level of the resulting image in the internal image buffer *param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | Read (PGFRect &rect, int level=0, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Read and decode smallest level of a PGF image at current stream position *For please refert to Read *(...)*Precondition After you ve written a PGF you can call this method followed by GetBitmap GetYUV *to get a quick | reconstruction (coded-> decoded image).*It might throw an IOException.*@param level The image level of the resulting image in the internal image buffer.*/void Reconstruct(int level=0) THROW_ |
*Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number *of passes over the data *The absolute value of pitch is the number of bytes of an image row of the given image buffer *If pitch is then the image buffer must point to the last row of a bottom up | image (first byte on last row).*if pitch is positive |
*Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number *of passes over the data *The absolute value of pitch is the number of bytes of an image row of the given image buffer *If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down | image (first byte).*The sequence of output channels in the output image buffer does not need to be the same as provided by PGF.In case of different sequences you have to *provide a channelMap of size of expected channels(depending on image mode).For example |
*Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number *of passes over the data *The absolute value of pitch is the number of bytes of an image row of the given image buffer *If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence then the channelMap looks then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | GetBitmap (int pitch, UINT8 *buff, BYTE bpp, int channelMap[]=NULL, CallbackPtr cb=NULL, void *data=NULL) const THROW_ |
*Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up | image (first byte on last row).*if pitch is positive |
*Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down | image (first byte).*The sequence of output channels in the output image buffer does not need to be the same as provided by PGF.In case of different sequences you have to *provide a channelMap of size of expected channels(depending on image mode).For example |
*Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence then the channelMap looks then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | GetYUV (int pitch, DataT *buff, BYTE bpp, int channelMap[]=NULL, CallbackPtr cb=NULL, void *data=NULL) const THROW_ |
*Import an image from a specified image buffer *This method is usually called before | Write (...) and after SetHeader(...).*The absolute value of pitch is the number of bytes of an image row.*If pitch is negative |
*Import an image from a specified image buffer *This method is usually called before then buff points to the last row of a bottom up | image (first byte on last row).*If pitch is positive |
*Import an image from a specified image buffer *This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down | image (first byte).*The sequence of input channels in the input image buffer does not need to be the same as expected from PGF.In case of different sequences you have to *provide a channelMap of size of expected channels(depending on image mode).For example |
*Import an image from a specified image buffer *This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence then the channelMap looks then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | ImportBitmap (int pitch, UINT8 *buff, BYTE bpp, int channelMap[]=NULL, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is then buff points to the last row of a bottom up | image (first byte on last row).*If pitch is positive |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down | image (first byte).*The sequence of input channels in the input image buffer does not need to be the same as expected from PGF.In case of different sequences you have to *provide a channelMap of size of expected channels(depending on image mode).For example |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence then the channelMap looks then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | ImportYUV (int pitch, DataT *buff, BYTE bpp, int channelMap[]=NULL, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Encode and write a entire PGF | image (header and image) at current stream position.*A PGF image is structered in levels |
*Encode and write a entire PGF numbered between and | Levels ()-1.*Each level can be seen as a single image |
*Encode and write a entire PGF numbered between and containing the same content *as all other but in a different | size (width, height).*The image size at level i is double the size(width |
*Encode and write a entire PGF numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void | Write (CPGFStream *stream, UINT32 *nWrittenBytes=NULL, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Create wavelet transform channels and encoder Write header at current stream position *Call this method before your first call of | Write (int level) or WriteImage() |
*Create wavelet transform channels and encoder Write header at current stream position *Call this method before your first call of but after | SetHeader ().*This method is called inside of Write(stream |
*Create wavelet transform channels and encoder Write header at current stream position *Call this method before your first call of but after *It might throw an IOException *param stream A PGF stream *return The number of bytes written into stream *UINT32 | WriteHeader (CPGFStream *stream) THROW_ |
*Encode and write the one and only image at current stream position *Call this method after | WriteHeader ().In case you want to write uncached metadata |
*Encode and write the one and only image at current stream position *Call this method after *then do that after | WriteHeader () and before WriteImage().*This method is called inside of Write(stream |
*Encode and write the one and only image at current stream position *Call this method after *then do that after *It might throw an IOException *param stream A PGF stream *param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns then it stops proceeding *param data Data Pointer to C class container to host callback procedure *return The number of bytes written into stream *UINT32 | WriteImage (CPGFStream *stream, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Encode and write down to given level at current stream position *A PGF image is structered in numbered between and | Levels ()-1.*Each level can be seen as a single image |
*Encode and write down to given level at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different | size (width, height).*The image size at level i is double the size(width |
*Encode and write down to given level at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer *param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns then it stops proceeding *param data Data Pointer to C class container to host callback procedure *return The number of bytes written into stream *UINT32 | Write (int level, CallbackPtr cb=NULL, void *data=NULL) THROW_ |
*Set internal PGF image buffer channel *param channel A YUV data channel *param c A channel index *void | SetChannel (DataT *channel, int c=0) |
*Set maximum intensity value for image modes with more than eight bits per channel *Call this method after but before ImportBitmap *param maxValue The maximum intensity value *void | SetMaxValue (UINT32 maxValue) |
*Set progress mode used in Read and Write *Default mode is PM_Relative *This method must be called before | Open () or SetHeader().*PM_Relative |
*Set refresh callback procedure and its parameter *The refresh callback is called during | Read (...) after each level read.*@param callback A refresh callback procedure *@param arg A parameter of the refresh callback procedure */void SetRefreshCallback(RefreshCB callback |
*Sets the | blue (RGB) color values for a range of entries in the palette(clut).*It might throw an IOException.*@param iFirstColor The color table index of the first entry to set.*@param nColors The number of color table entries to set.*@param prgbColors A pointer to the array of RGBQUAD structures to set the color table entries.*/void SetColorTable(UINT32 iFirstColor |
*Return an internal YUV image channel *param c A channel index *return An internal YUV image channel *DataT * | GetChannel (int c=0) |
*Retrieves | blue (RGB) color values from a range of entries in the palette of the DIB section.*It might throw an IOException.*@param iFirstColor The color table index of the first entry to retrieve.*@param nColors The number of color table entries to retrieve.*@param prgbColors A pointer to the array of RGBQUAD structures to retrieve the color table entries.*/void GetColorTable(UINT32 iFirstColor |
const RGBQUAD * | GetColorTable () const |
*Return the PGF header structure *return A PGF header structure *const PGFHeader * | GetHeader () const |
*Get maximum intensity value for image modes with more than eight bits per channel *Don t call this method before the PGF header has been read *return The maximum intensity value *UINT32 | GetMaxValue () const |
*Return current image width of given channel in pixels *The returned width depends on the levels read so far and on ROI *param c A channel index *return Channel width in pixels *UINT32 | ChannelWidth (int c=0) const |
*Return current image height of given channel in pixels *The returned height depends on the levels read so far and on ROI *param c A channel index *return Channel height in pixels *UINT32 | ChannelHeight (int c=0) const |
*Return bits per channel of the image s encoder *return Bits per channel *BYTE | ChannelDepth () const |
*Return image width of channel at given level in pixels *The returned width is independent of any Read operations and ROI *param level A level *return Image level width in pixels *UINT32 | Width (int level=0) const |
*Return image height of channel at given level in pixels *The returned height is independent of any Read operations and ROI *param level A level *return Image level height in pixels *UINT32 | Height (int level=0) const |
*Return current image level *Since | Read (...) can be used to read each image level separately |
*Return current image level *Since it is *helpful to know the current level The current level immediately after | Open (...) is Levels().*@return Current image level */BYTE Level() const |
*Return the number of image levels *return Number of image levels *BYTE | Levels () const |
*Return the PGF quality The quality is inbetween and MaxQuality *PGF quality means lossless quality *return PGF quality *BYTE | Quality () const |
*Return the number of image channels *An image of type RGB contains image | channels (B, G, R).*@return Number of image channels */BYTE Channels() const |
*Return the image mode *An image mode is a predefined constant | value (see also PGFtypes.h) compatible with Adobe Photoshop.*It represents an image type and format.*@return Image mode */BYTE Mode() const |
*Return the number of bits per pixel *Valid values can *return Number of bits per pixel *BYTE | BPP () const |
*Return true if the pgf image supports Region Of | Interest (ROI).*@return true if the pgf image supports ROI.*/bool ROIisSupported() const |
*Returns images PGF version *return PGF codec version of the image *BYTE | Version () const |
*Check for valid import image mode *param mode Image mode *return True if an image of given mode can be imported with | ImportBitmap (...)*/static bool ImportIsSupported(BYTE mode) |
*Compute and return image width at given level *param width Original image | width (at level 0)*@param level An image level *@return Image level width in pixels */static UINT32 LevelWidth(UINT32 width |
Static Public Member Functions | |
*Compute and return codec version *return current PGF codec version *static BYTE | CurrentChannelDepth (BYTE version=PGFVersion) |
Public Attributes | |
*Standard | constructor: It is used to create a PGF instance for opening and reading. */ CPGFImage() |
* | Destructor: Destroy internal data structures. */ virtual ~CPGFImage() |
*Open a PGF image at current stream | position: read pre-header |
*Open a PGF image at current stream | header |
*Open a PGF image at current stream and ckeck image type * | Precondition: The stream has been opened for reading. * It might throw an IOException. * @param stream A PGF stream */ void Open(CPGFStream* stream) THROW_ |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in | levels |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in numbered between and containing the same content *as all other | levels |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size * | Precondition: The PGF image has been opened with a call of Open(...). * It might throw an IOException. * @param level [0 |
*Read and decode some levels of a PGF image at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer *param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns | true |
*Read a rectangular region of interest of a PGF image at current stream position *The origin of the coordinate axis is the top left corner of the image *All coordinates are measured in pixels *It might throw an IOException *param rect[inout] Rectangular region of nLevels The image level of the resulting image in the internal image buffer *param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns | true |
*Read and decode smallest level of a PGF image at current stream position *For | details |
*Read and decode smallest level of a PGF image at current stream position *For please refert to Read *(...)*Precondition After you ve written a PGF | image |
*Get image data in interleaved | format: (ordering of RGB data is BGR[A]) * Upsampling |
*Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number *of passes over the data *The absolute value of pitch is the number of bytes of an image row of the given image buffer *If pitch is | negative |
*Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number *of passes over the data *The absolute value of pitch is the number of bytes of an image row of the given image buffer *If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence | ARGB |
*Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number *of passes over the data *The absolute value of pitch is the number of bytes of an image row of the given image buffer *If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence then the channelMap looks | like |
*Get YUV image data in interleaved | format: (ordering is YUV[A]) * The absolute value of pitch is the number of bytes of an image row of the given image buffer. * If pitch is negative |
*Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence | VUY |
*Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence then the channelMap looks | like |
*Import an image from a specified image buffer *This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence | ARGB |
*Import an image from a specified image buffer *This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence then the channelMap looks | like |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is | negative |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence | VUY |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence then the channelMap looks | like |
*Encode and write a entire PGF numbered between and containing the same content *as all other | levels |
*Encode and write a entire PGF numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size * | Precondition: the PGF image contains a valid header (see also SetHeader(...)). * It might throw an IOException. * @param stream A PGF stream * @param nWrittenBytes [in-out] The number of bytes written into stream are added to the input value. * @param cb A pointer to a callback procedure. The procedure is called after writing a single level. If cb returns true |
*Encode and write the one and only image at current stream position *Call this method after *then do that after *It might throw an IOException *param stream A PGF stream *param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns | true |
*Encode and write down to given level at current stream position *A PGF image is structered in | levels |
*Encode and write down to given level at current stream position *A PGF image is structered in numbered between and containing the same content *as all other | levels |
*Encode and write down to given level at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size * | Preconditions: the PGF image contains a valid header (see also SetHeader(...)) and * WriteHeader() has been called before. Levels() > 0. * The ROI encoding scheme must be used (see also SetHeader(...)). * It might throw an IOException. * @param level [0 |
*Encode and write down to given level at current stream position *A PGF image is structered in numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer *param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns | true |
*Configures the encoder *param useOMP Use parallel threading with Open MP during encoding Default | value: true. Influences the encoding only if the codec has been compiled with OpenMP support. * @param favorSpeedOverSize Favors encoding speed over compression ratio. Default value: false */ void ConfigureEncoder(bool useOMP = true |
*Configures the encoder *param useOMP Use parallel threading with Open MP during encoding Default bool | favorSpeedOverSize |
*Set PGF header and user data * | Precondition: The PGF image has been closed with Close(...) or never opened with Open(...). * It might throw an IOException. * @param header A valid and already filled in PGF header structure * @param flags A combination of additional version flags. In case you use level-wise encoding then set flag = PGFROI. * @param userData A user-defined memory block containing any kind of cached metadata. * @param userDataLength The size of user-defined memory block in bytes */ void SetHeader(const PGFHeader& header |
*Set PGF header and user data BYTE | flags = 0 |
*Set PGF header and user data BYTE UINT8 * | userData = 0 |
*Set PGF header and user data BYTE UINT8 UINT32 | userDataLength = 0) THROW_ |
*Set maximum intensity value for image modes with more than eight bits per channel *Call this method after | SetHeader |
*Set refresh callback procedure and its parameter *The refresh callback is called during void * | arg { m_cb = callback |
m_cbArg = arg | |
*Sets the | red |
*Sets the | green |
*Sets the UINT32 | nColors |
*Sets the UINT32 const RGBQUAD *prgbColors | THROW_ |
*Retrieves | red |
*Retrieves | green |
*Retrieves UINT32 | nColors |
*Retrieves UINT32 RGBQUAD *prgbColors const | THROW_ |
*Return the stream position of the user data or * | Precondition: The PGF image has been opened with a call of Open(...). */ UINT64 GetUserDataPos() const { return m_userDataPos |
*Return user data and size of user data * | Precondition: The PGF image has been opened with a call of Open(...). * @param size [out] Size of user data in bytes. * @return A pointer to user data or NULL if there is no user data. */ const UINT8* GetUserData(UINT32& size) const |
*Return the length of all encoded headers in bytes * | Precondition: The PGF image has been opened with a call of Open(...). * @return The length of all encoded headers in bytes */ UINT32 GetEncodedHeaderLength() const |
*Return the length of an encoded PGF level in bytes * | Precondition: The PGF image has been opened with a call of Open(...). * @param level The image level * @return The length of a PGF level in bytes */ UINT32 GetEncodedLevelLength(int level) const { ASSERT(level >= 0 && level < m_header.nLevels) |
return | m_levelLength [m_header.nLevels-level-1] |
*Reads the encoded PGF headers and copies it to a target buffer * | Precondition: The PGF image has been opened with a call of Open(...). * It might throw an IOException. * @param target The target buffer * @param targetLen The length of the target buffer in bytes * @return The number of bytes copied to the target buffer */ UINT32 ReadEncodedHeader(UINT8* target |
*Reads the encoded PGF headers and copies it to a target buffer UINT32 targetLen const | THROW_ |
*Reads the data of an encoded PGF level and copies it to a target buffer *without decoding * | Precondition: The PGF image has been opened with a call of Open(...). * It might throw an IOException. * @param level The image level * @param target The target buffer * @param targetLen The length of the target buffer in bytes * @return The number of bytes copied to the target buffer */ UINT32 ReadEncodedData(int level |
*Reads the data of an encoded PGF level and copies it to a target buffer *without decoding UINT8 * | target |
*Reads the data of an encoded PGF level and copies it to a target buffer *without decoding UINT8 UINT32 targetLen const | THROW_ |
*Return the number of bits per pixel *Valid values can | be |
*Returns number of used bits per input output image channel * | Precondition: header must be initialized. * @return number of used bits per input/output image channel. */ BYTE UsedBitsPerChannel() const |
*Compute and return image width at given level *param width Original image int | level { ASSERT(level >= 0) |
UINT32 | w = (width >> level) |
return *((w<< level)==width)?w Compute and return image height at given level *param height Original image int | level { ASSERT(level >= 0) |
UINT32 | h = (height >> level) |
Protected Attributes | |
CWaveletTransform * | m_wtChannel [MaxChannels] |
wavelet transformed color channels | |
DataT * | m_channel [MaxChannels] |
untransformed channels in YUV format | |
CDecoder * | m_decoder |
PGF decoder. | |
CEncoder * | m_encoder |
PGF encoder. | |
UINT32 * | m_levelLength |
length of each level in bytes; first level starts immediately after this array | |
UINT32 | m_width [MaxChannels] |
width of each channel at current level | |
UINT32 | m_height [MaxChannels] |
height of each channel at current level | |
PGFPreHeader | m_preHeader |
PGF pre-header. | |
PGFHeader | m_header |
PGF file header. | |
PGFPostHeader | m_postHeader |
PGF post-header. | |
UINT64 | m_userDataPos |
stream position of user data | |
int | m_currentLevel |
transform level of current image | |
BYTE | m_quant |
quantization parameter | |
bool | m_downsample |
chrominance channels are downsampled | |
bool | m_favorSpeedOverSize |
favor encoding speed over compression ratio | |
bool | m_useOMPinEncoder |
use Open MP in encoder | |
bool | m_useOMPinDecoder |
use Open MP in decoder | |
bool | m_skipUserData |
skip user data (metadata) during open | |
bool | m_streamReinitialized |
stream has been reinitialized | |
PGFRect | m_roi |
region of interest | |
Private Member Functions | |
void | ComputeLevels () |
void | CompleteHeader () |
void | RgbToYuv (int pitch, UINT8 *rgbBuff, BYTE bpp, int channelMap[], CallbackPtr cb, void *data) THROW_ |
void | Downsample (int nChannel) |
UINT32 | UpdatePostHeaderSize () THROW_ |
void | WriteLevel () THROW_ |
void | SetROI (PGFRect rect) |
UINT8 | Clamp4 (DataT v) const |
UINT16 | Clamp6 (DataT v) const |
UINT8 | Clamp8 (DataT v) const |
UINT16 | Clamp16 (DataT v) const |
UINT32 | Clamp31 (DataT v) const |
Private Attributes | |
RefreshCB | m_cb |
pointer to refresh callback procedure | |
void * | m_cbArg |
refresh callback argument | |
double | m_percent |
progress [0..1] | |
ProgressMode | m_progressMode |
progress mode used in Read and Write; PM_Relative is default mode | |
Definition at line 56 of file PGFimage.h.
* Sets the CPGFImage::blue | ( | RGB | ) |
* Retrieves CPGFImage::blue | ( | RGB | ) |
|
inline |
Definition at line 460 of file PGFimage.h.
|
inline |
Definition at line 409 of file PGFimage.h.
|
inline |
Definition at line 404 of file PGFimage.h.
|
inline |
Definition at line 445 of file PGFimage.h.
|
inline |
Definition at line 397 of file PGFimage.h.
|
inlineprivate |
Definition at line 561 of file PGFimage.h.
|
inlineprivate |
Definition at line 564 of file PGFimage.h.
|
inlineprivate |
Definition at line 551 of file PGFimage.h.
|
inlineprivate |
Definition at line 554 of file PGFimage.h.
|
inlineprivate |
Definition at line 557 of file PGFimage.h.
|
virtual |
Definition at line 121 of file PGFimage.cpp.
|
private |
Definition at line 207 of file PGFimage.cpp.
|
private |
Definition at line 798 of file PGFimage.cpp.
|
inlinestatic |
Definition at line 508 of file PGFimage.h.
|
virtual |
Definition at line 104 of file PGFimage.cpp.
|
private |
Definition at line 754 of file PGFimage.cpp.
void CPGFImage::GetBitmap | ( | int | pitch, |
UINT8 * | buff, | ||
BYTE | bpp, | ||
int | channelMap[] = NULL , |
||
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) | const |
Definition at line 1697 of file PGFimage.cpp.
|
inline |
Definition at line 321 of file PGFimage.h.
|
inline |
|
inline |
Definition at line 339 of file PGFimage.h.
|
inline |
Definition at line 345 of file PGFimage.h.
*Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode *If your provided image buffer expects a channel sequence then the channelMap looks then it stops proceeding *void CPGFImage::GetYUV | ( | int | pitch, |
DataT * | buff, | ||
BYTE | bpp, | ||
int | channelMap[] = NULL , |
||
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) | const |
Definition at line 2455 of file PGFimage.cpp.
* Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number* of passes over the data* The absolute value of pitch is the number of bytes of an image row of the given image buffer* If pitch is then the image buffer must point to the last row of a bottom up CPGFImage::image | ( | first byte on last | row | ) |
* Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number* of passes over the data* The absolute value of pitch is the number of bytes of an image row of the given image buffer* If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down CPGFImage::image | ( | first | byte | ) |
* Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up CPGFImage::image | ( | first byte on last | row | ) |
* Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down CPGFImage::image | ( | first | byte | ) |
* Import an image from a specified image buffer* This method is usually called before then buff points to the last row of a bottom up CPGFImage::image | ( | first byte on last | row | ) |
* Import an image from a specified image buffer* This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down CPGFImage::image | ( | first | byte | ) |
* Import a YUV image from a specified image buffer* The absolute value of pitch is the number of bytes of an image row* If pitch is then buff points to the last row of a bottom up CPGFImage::image | ( | first byte on last | row | ) |
* Import a YUV image from a specified image buffer* The absolute value of pitch is the number of bytes of an image row* If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down CPGFImage::image | ( | first | byte | ) |
* Encode and write a entire PGF CPGFImage::image | ( | header and | image | ) |
void CPGFImage::ImportBitmap | ( | int | pitch, |
UINT8 * | buff, | ||
BYTE | bpp, | ||
int | channelMap[] = NULL , |
||
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
Definition at line 737 of file PGFimage.cpp.
* Check for valid import image mode* param mode Image mode* return True if an image of given mode can be imported with CPGFImage::ImportBitmap | ( | ... | ) |
*Import a YUV image from a specified image buffer *The absolute value of pitch is the number of bytes of an image row *If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR *If your provided image buffer contains a channel sequence then the channelMap looks then it stops proceeding *void CPGFImage::ImportYUV | ( | int | pitch, |
DataT * | buff, | ||
BYTE | bpp, | ||
int | channelMap[] = NULL , |
||
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
Definition at line 2566 of file PGFimage.cpp.
* Read a rectangular region of interest of a PGF image at current stream position* The origin of the coordinate axis is the top left corner of the image* All coordinates are measured in pixels* It might throw an IOException* param rect [inout] Rectangular region of CPGFImage::interest | ( | ROI | ) |
Definition at line 463 of file PGFimage.h.
Definition at line 87 of file PGFimage.h.
* Read and decode some levels of a PGF image at current stream position* A PGF image is structered in numbered between and CPGFImage::Levels | ( | ) |
* Encode and write a entire PGF numbered between and CPGFImage::Levels | ( | ) |
* Encode and write down to given level at current stream position* A PGF image is structered in numbered between and CPGFImage::Levels | ( | ) |
|
inline |
Definition at line 435 of file PGFimage.h.
|
inline |
Definition at line 297 of file PGFimage.h.
|
inline |
Definition at line 428 of file PGFimage.h.
|
inline |
Definition at line 441 of file PGFimage.h.
void CPGFImage::Read | ( | int | level = 0 , |
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
Definition at line 382 of file PGFimage.cpp.
* Read a rectangular region of interest of a PGF image at current stream position* The origin of the coordinate axis is the top left corner of the image* All coordinates are measured in pixels* It might throw an IOException* param rect [inout] Rectangular region of nLevels The image level of the resulting image in the internal image buffer* param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns then it stops proceeding* param data Data Pointer to C class container to host callback procedure* void CPGFImage::Read | ( | PGFRect & | rect, |
int | level = 0 , |
||
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
* Set refresh callback procedure and its parameter* The refresh callback is called during CPGFImage::Read | ( | ... | ) |
|
pure virtual |
|
private |
Definition at line 1308 of file PGFimage.cpp.
|
inline |
Definition at line 276 of file PGFimage.h.
* Create wavelet transform channels and encoder Write header at current stream position* Call this method before your first call of but after CPGFImage::SetHeader | ( | ) |
*Set maximum intensity value for image modes with more than eight bits per channel *Call this method after but before ImportBitmap *param maxValue The maximum intensity value *void CPGFImage::SetMaxValue | ( | UINT32 | maxValue | ) |
Definition at line 684 of file PGFimage.cpp.
|
private |
* Read and decode some levels of a PGF image at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different CPGFImage::size | ( | width | , |
height | |||
) |
* Encode and write a entire PGF numbered between and containing the same content* as all other but in a different CPGFImage::size | ( | width | , |
height | |||
) |
* Encode and write down to given level at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different CPGFImage::size | ( | width | , |
height | |||
) |
|
private |
Definition at line 1044 of file PGFimage.cpp.
|
inline |
Definition at line 451 of file PGFimage.h.
|
inline |
Definition at line 476 of file PGFimage.h.
* Compute and return image width at given level* param width Original image CPGFImage::width | ( | at level | 0 | ) |
* Import an image from a specified image buffer* This method is usually called before CPGFImage::Write | ( | ... | ) |
*Encode and write a entire PGF numbered between and containing the same content *as all other but in a different height of the image at level i *The image at level contains the original size then it stops proceeding *param data Data Pointer to C class container to host callback procedure *void CPGFImage::Write | ( | CPGFStream * | stream, |
UINT32 * | nWrittenBytes = NULL , |
||
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
Definition at line 1140 of file PGFimage.cpp.
* Create wavelet transform channels and encoder Write header at current stream position* Call this method before your first call of CPGFImage::Write | ( | int | level | ) |
* Encode and write down to given level at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different height of the image at level i* The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer* param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns then it stops proceeding* param data Data Pointer to C class container to host callback procedure* return The number of bytes written into stream* UINT32 CPGFImage::Write | ( | int | level, |
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
*Create wavelet transform channels and encoder Write header at current stream position *Call this method before your first call of but after *It might throw an IOException *param stream A PGF stream *return The number of bytes written into stream *UINT32 CPGFImage::WriteHeader | ( | CPGFStream * | stream | ) |
Definition at line 917 of file PGFimage.cpp.
* Encode and write the one and only image at current stream position* Call this method after CPGFImage::WriteHeader | ( | ) |
* Encode and write the one and only image at current stream position* Call this method after * then do that after CPGFImage::WriteHeader | ( | ) |
*Encode and write the one and only image at current stream position *Call this method after *then do that after *It might throw an IOException *param stream A PGF stream *param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns then it stops proceeding *param data Data Pointer to C class container to host callback procedure *return The number of bytes written into stream *UINT32 CPGFImage::WriteImage | ( | CPGFStream * | stream, |
CallbackPtr | cb = NULL , |
||
void * | data = NULL |
||
) |
Definition at line 1069 of file PGFimage.cpp.
|
private |
Definition at line 989 of file PGFimage.cpp.
* Set refresh callback procedure and its parameter* The refresh callback is called during void* CPGFImage::arg { m_cb = callback |
Definition at line 307 of file PGFimage.h.
* Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number* of passes over the data* The absolute value of pitch is the number of bytes of an image row of the given image buffer* If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode* If your provided image buffer expects a channel sequence CPGFImage::ARGB |
Definition at line 139 of file PGFimage.h.
* Import an image from a specified image buffer* This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR* If your provided image buffer contains a channel sequence CPGFImage::ARGB |
Definition at line 174 of file PGFimage.h.
* Return the number of bits per pixel* Valid values can CPGFImage::be |
Definition at line 458 of file PGFimage.h.
* Standard CPGFImage::constructor |
Definition at line 62 of file PGFimage.h.
* CPGFImage::Destructor |
Definition at line 66 of file PGFimage.h.
Definition at line 118 of file PGFimage.h.
* Configures the encoder* param useOMP Use parallel threading with Open MP during encoding Default bool CPGFImage::favorSpeedOverSize |
Definition at line 260 of file PGFimage.h.
Definition at line 286 of file PGFimage.h.
Definition at line 132 of file PGFimage.h.
Definition at line 152 of file PGFimage.h.
* Sets the CPGFImage::green |
Definition at line 310 of file PGFimage.h.
* Retrieves CPGFImage::green |
Definition at line 324 of file PGFimage.h.
Definition at line 498 of file PGFimage.h.
Definition at line 79 of file PGFimage.h.
* Read and decode smallest level of a PGF image at current stream position* For please refert to Read* (...) * Precondition After you ve written a PGF CPGFImage::image |
Definition at line 118 of file PGFimage.h.
* Compute and return image width at given level* param width Original image int CPGFImage::level { ASSERT(level >= 0) |
Definition at line 491 of file PGFimage.h.
return* ((w << level) == width) ? w Compute and return image height at given level* param height Original image int CPGFImage::level { ASSERT(level >= 0) |
Definition at line 498 of file PGFimage.h.
* Read and decode some levels of a PGF image at current stream position* A PGF image is structered in CPGFImage::levels |
Definition at line 91 of file PGFimage.h.
* Read and decode some levels of a PGF image at current stream position* A PGF image is structered in numbered between and containing the same content* as all other CPGFImage::levels |
Definition at line 93 of file PGFimage.h.
* Encode and write a entire PGF numbered between and containing the same content* as all other CPGFImage::levels |
Definition at line 205 of file PGFimage.h.
* Encode and write down to given level at current stream position* A PGF image is structered in CPGFImage::levels |
Definition at line 240 of file PGFimage.h.
* Encode and write down to given level at current stream position* A PGF image is structered in numbered between and containing the same content* as all other CPGFImage::levels |
Definition at line 242 of file PGFimage.h.
* Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number* of passes over the data* The absolute value of pitch is the number of bytes of an image row of the given image buffer* If pitch is then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode* If your provided image buffer expects a channel sequence then the channelMap looks CPGFImage::like |
Definition at line 139 of file PGFimage.h.
* Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode* If your provided image buffer expects a channel sequence then the channelMap looks CPGFImage::like |
Definition at line 156 of file PGFimage.h.
* Import an image from a specified image buffer* This method is usually called before then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR* If your provided image buffer contains a channel sequence then the channelMap looks CPGFImage::like |
Definition at line 174 of file PGFimage.h.
* Import a YUV image from a specified image buffer* The absolute value of pitch is the number of bytes of an image row* If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR* If your provided image buffer contains a channel sequence then the channelMap looks CPGFImage::like |
Definition at line 191 of file PGFimage.h.
|
private |
pointer to refresh callback procedure
Definition at line 535 of file PGFimage.h.
CPGFImage::m_cbArg = arg |
Definition at line 307 of file PGFimage.h.
|
private |
refresh callback argument
Definition at line 536 of file PGFimage.h.
|
protected |
untransformed channels in YUV format
Definition at line 512 of file PGFimage.h.
|
protected |
transform level of current image
Definition at line 522 of file PGFimage.h.
|
protected |
PGF decoder.
Definition at line 513 of file PGFimage.h.
|
protected |
chrominance channels are downsampled
Definition at line 524 of file PGFimage.h.
|
protected |
PGF encoder.
Definition at line 514 of file PGFimage.h.
|
protected |
favor encoding speed over compression ratio
Definition at line 525 of file PGFimage.h.
|
protected |
PGF file header.
Definition at line 519 of file PGFimage.h.
|
protected |
height of each channel at current level
Definition at line 517 of file PGFimage.h.
return CPGFImage::m_levelLength[m_header.nLevels-level-1] |
Definition at line 370 of file PGFimage.h.
|
protected |
length of each level in bytes; first level starts immediately after this array
Definition at line 515 of file PGFimage.h.
|
private |
progress [0..1]
Definition at line 537 of file PGFimage.h.
|
protected |
PGF post-header.
Definition at line 520 of file PGFimage.h.
|
protected |
PGF pre-header.
Definition at line 518 of file PGFimage.h.
|
private |
progress mode used in Read and Write; PM_Relative is default mode
Definition at line 538 of file PGFimage.h.
|
protected |
quantization parameter
Definition at line 523 of file PGFimage.h.
|
protected |
region of interest
Definition at line 531 of file PGFimage.h.
|
protected |
skip user data (metadata) during open
Definition at line 528 of file PGFimage.h.
|
protected |
stream has been reinitialized
Definition at line 530 of file PGFimage.h.
|
protected |
use Open MP in decoder
Definition at line 527 of file PGFimage.h.
|
protected |
use Open MP in encoder
Definition at line 526 of file PGFimage.h.
|
protected |
stream position of user data
Definition at line 521 of file PGFimage.h.
|
protected |
width of each channel at current level
Definition at line 516 of file PGFimage.h.
|
protected |
wavelet transformed color channels
Definition at line 511 of file PGFimage.h.
* Sets the UINT32 CPGFImage::nColors |
Definition at line 315 of file PGFimage.h.
* Retrieves UINT32 CPGFImage::nColors |
Definition at line 329 of file PGFimage.h.
* Get image data in interleaved YUV to RGB transform and interleaving are done here to reduce the number* of passes over the data* The absolute value of pitch is the number of bytes of an image row of the given image buffer* If pitch is CPGFImage::negative |
Definition at line 132 of file PGFimage.h.
* Import a YUV image from a specified image buffer* The absolute value of pitch is the number of bytes of an image row* If pitch is CPGFImage::negative |
Definition at line 187 of file PGFimage.h.
Definition at line 79 of file PGFimage.h.
Definition at line 79 of file PGFimage.h.
* Read and decode some levels of a PGF image at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different height of the image at level i* The image at level contains the original size* CPGFImage::Precondition |
Definition at line 98 of file PGFimage.h.
* Encode and write a entire PGF numbered between and containing the same content* as all other but in a different height of the image at level i* The image at level contains the original size* CPGFImage::Precondition |
Definition at line 212 of file PGFimage.h.
Definition at line 286 of file PGFimage.h.
Definition at line 350 of file PGFimage.h.
Definition at line 357 of file PGFimage.h.
* Return the length of all encoded headers in bytes* CPGFImage::Precondition |
Definition at line 363 of file PGFimage.h.
* Return the length of an encoded PGF level in bytes* CPGFImage::Precondition |
Definition at line 370 of file PGFimage.h.
* Reads the encoded PGF headers and copies it to a target buffer* CPGFImage::Precondition |
Definition at line 379 of file PGFimage.h.
* Reads the data of an encoded PGF level and copies it to a target buffer* without decoding* CPGFImage::Precondition |
Definition at line 390 of file PGFimage.h.
Definition at line 471 of file PGFimage.h.
* Encode and write down to given level at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different height of the image at level i* The image at level contains the original size* CPGFImage::Preconditions |
Definition at line 249 of file PGFimage.h.
* Sets the CPGFImage::red |
Definition at line 310 of file PGFimage.h.
* Retrieves CPGFImage::red |
Definition at line 324 of file PGFimage.h.
* Set maximum intensity value for image modes with more than eight bits per channel* Call this method after CPGFImage::SetHeader |
Definition at line 290 of file PGFimage.h.
* Reads the data of an encoded PGF level and copies it to a target buffer* without decoding UINT8* CPGFImage::target |
Definition at line 390 of file PGFimage.h.
* Sets the UINT32 const RGBQUAD* prgbColors CPGFImage::THROW_ |
Definition at line 315 of file PGFimage.h.
* Retrieves UINT32 RGBQUAD* prgbColors const CPGFImage::THROW_ |
Definition at line 329 of file PGFimage.h.
* Reads the encoded PGF headers and copies it to a target buffer UINT32 targetLen const CPGFImage::THROW_ |
Definition at line 379 of file PGFimage.h.
* Reads the data of an encoded PGF level and copies it to a target buffer* without decoding UINT8 UINT32 targetLen const CPGFImage::THROW_ |
Definition at line 390 of file PGFimage.h.
* Read and decode some levels of a PGF image at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different height of the image at level i* The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer* param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns CPGFImage::true |
Definition at line 98 of file PGFimage.h.
* Read a rectangular region of interest of a PGF image at current stream position* The origin of the coordinate axis is the top left corner of the image* All coordinates are measured in pixels* It might throw an IOException* param rect [inout] Rectangular region of nLevels The image level of the resulting image in the internal image buffer* param cb A pointer to a callback procedure The procedure is called after reading a single level If cb returns CPGFImage::true |
Definition at line 111 of file PGFimage.h.
* Encode and write the one and only image at current stream position* Call this method after * then do that after * It might throw an IOException* param stream A PGF stream* param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns CPGFImage::true |
Definition at line 232 of file PGFimage.h.
* Encode and write down to given level at current stream position* A PGF image is structered in numbered between and containing the same content* as all other but in a different height of the image at level i* The image at level contains the original size nLevels The image level of the resulting image in the internal image buffer* param cb A pointer to a callback procedure The procedure is called after writing a single level If cb returns CPGFImage::true |
Definition at line 249 of file PGFimage.h.
Definition at line 286 of file PGFimage.h.
Definition at line 286 of file PGFimage.h.
* Configures the encoder* param useOMP Use parallel threading with Open MP during encoding Default CPGFImage::value |
Definition at line 260 of file PGFimage.h.
* Get YUV image data in interleaved then the image buffer must point to the last row of a bottom up then the image buffer must point to the first row of a top down PGF provides a channel sequence BGR in RGB color mode* If your provided image buffer expects a channel sequence CPGFImage::VUY |
Definition at line 156 of file PGFimage.h.
* Import a YUV image from a specified image buffer* The absolute value of pitch is the number of bytes of an image row* If pitch is then buff points to the last row of a bottom up then buff points to the first row of a top down PGF expects in RGB color mode a channel sequence BGR* If your provided image buffer contains a channel sequence CPGFImage::VUY |
Definition at line 191 of file PGFimage.h.
Definition at line 491 of file PGFimage.h.