libpgf
6.12.24
PGF - Progressive Graphics File
|
Go to the source code of this file.
Macros | |
#define | YUVoffset4 8 |
#define | YUVoffset6 32 |
#define | YUVoffset8 128 |
#define | YUVoffset16 32768 |
Functions | |
*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 CPGFImage |
if (ROIisSupported()) | |
while (currentLevel > level) | |
return m_decoder | GetEncodedHeaderLength () |
ASSERT (targetLen > 0) | |
ASSERT (m_decoder) | |
m_decoder | SetStreamPosToStart () |
ASSERT (len >=0 &&len<=targetLen) | |
ASSERT (target) | |
m_decoder | SetStreamPosToData () |
for (int i=m_header.nLevels-1;i > level;i--) | |
m_decoder | Skip (offset) |
if (bpc > 8) | |
ASSERT (header.quality<=MaxQuality) | |
memcpy (m_preHeader.magic, Magic, 3) | |
CompleteHeader () | |
ComputeLevels () | |
if (m_header.quality > DownsampleThreshold &&(m_header.mode==ImageModeRGBColor||m_header.mode==ImageModeRGBA||m_header.mode==ImageModeRGB48||m_header.mode==ImageModeCMYKColor||m_header.mode==ImageModeCMYK64||m_header.mode==ImageModeLabColor||m_header.mode==ImageModeLab48)) | |
if (m_header.mode==ImageModeIndexedColor) | |
if (userDataLength &&userData) | |
for (int i=0;i< m_header.channels;i++) | |
*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 |
*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 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 |
*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 CPGFImage | for (UINT32 i=iFirstColor, j=0;j< nColors;i++, j++) |
*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 |
Variables | |
*Return user data and size of user data * | Precondition |
return m_postHeader | userData |
*After you ve written a PGF | image |
else | |
*Reads the encoded PGF headers and copies it to a target buffer UINT32 targetLen const | THROW_ |
UINT32 | len = __min(targetLen, GetEncodedHeaderLength()) |
*Reads the data of an encoded PGF level and copies it to a target buffer *without decoding UINT8 * | target |
UINT64 | offset = 0 |
*Set maximum intensity value for image modes with more than eight bits per channel *Call this method after | SetHeader |
*Set PGF header and user data BYTE | flags |
m_preHeader | version = PGFVersion | flags |
m_preHeader | hSize = HeaderSize |
memcpy & | m_header |
m_quant = m_header.quality | |
*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 a entire PGF numbered between and containing the same content *as all other | levels |
*Retrieves | red |
*Retrieves | green |
*Get YUV image data in interleaved | format |
*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 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 |
#define YUVoffset16 32768 |
Definition at line 38 of file PGFimage.cpp.
#define YUVoffset4 8 |
Definition at line 35 of file PGFimage.cpp.
#define YUVoffset6 32 |
Definition at line 36 of file PGFimage.cpp.
#define YUVoffset8 128 |
Definition at line 37 of file PGFimage.cpp.
ASSERT | ( | targetLen | , |
0 | |||
) |
ASSERT | ( | m_decoder | ) |
ASSERT | ( | target | ) |
ASSERT | ( | header.quality<= | MaxQuality | ) |
CompleteHeader | ( | ) |
ComputeLevels | ( | ) |
for | ( | int | i = m_header.nLevels - 1; i , |
level;i-- | |||
) |
Definition at line 665 of file PGFimage.cpp.
for | ( | ) |
Definition at line 891 of file PGFimage.cpp.
* 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 CPGFImage for | ( | UINT32 | i = iFirstColor | ) |
Definition at line 1272 of file PGFimage.cpp.
return m_decoder GetEncodedHeaderLength | ( | ) |
if | ( | ROIisSupported() | ) |
Definition at line 342 of file PGFimage.cpp.
if | ( | bpc | , |
8 | |||
) |
Definition at line 705 of file PGFimage.cpp.
if | ( | m_header. | quality, |
DownsampleThreshold && | m_header.mode==ImageModeRGBColor||m_header.mode==ImageModeRGBA||m_header.mode==ImageModeRGB48||m_header.mode==ImageModeCMYKColor||m_header.mode==ImageModeCMYK64||m_header.mode==ImageModeLabColor||m_header.mode==ImageModeLab48 | ||
) |
Definition at line 862 of file PGFimage.cpp.
if | ( | m_header. | mode = = ImageModeIndexedColor | ) |
Definition at line 877 of file PGFimage.cpp.
if | ( | userDataLength && | userData | ) |
Definition at line 881 of file PGFimage.cpp.
* Encode and write a entire PGF image | ( | header and | image | ) |
* 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 | ) |
* 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 | ) |
* Encode and write a entire PGF numbered between and Levels | ( | ) |
memcpy | ( | m_preHeader. | magic, |
Magic | , | ||
3 | |||
) |
* After you ve written a PGF you can call this method followed by GetBitmap GetYUV* to get a quick reconstruction | ( | coded-> decoded | image | ) |
* Create wavelet transform channels and encoder Write header at current stream position* Call this method before your first call of but after SetHeader | ( | ) |
m_decoder SetStreamPosToData | ( | ) |
m_decoder SetStreamPosToStart | ( | ) |
* Encode and write a entire PGF numbered between and containing the same content* as all other but in a different size | ( | width | , |
height | |||
) |
m_decoder Skip | ( | offset | ) |
while | ( | currentLevel | , |
level | |||
) |
Definition at line 347 of file PGFimage.cpp.
* Create wavelet transform channels and encoder Write header at current stream position* Call this method before your first call of Write | ( | int | level | ) |
*Encode and write the one and only image at current stream position *Call this method after *then do that after WriteHeader | ( | ) |
else |
Definition at line 339 of file PGFimage.cpp.
Definition at line 838 of file PGFimage.cpp.
Definition at line 2444 of file PGFimage.cpp.
*Sets the green |
Definition at line 1264 of file PGFimage.cpp.
m_preHeader hSize = HeaderSize |
Definition at line 850 of file PGFimage.cpp.
*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 |
Definition at line 326 of file PGFimage.cpp.
return len = __min(targetLen, GetEncodedHeaderLength()) |
Definition at line 628 of file PGFimage.cpp.
* Encode and write a entire PGF numbered between and containing the same content* as all other levels |
Definition at line 1131 of file PGFimage.cpp.
*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 |
Definition at line 2448 of file PGFimage.cpp.
memcpy& m_header |
Definition at line 853 of file PGFimage.cpp.
m_quant = m_header.quality |
Definition at line 873 of file PGFimage.cpp.
* 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 |
Definition at line 2555 of file PGFimage.cpp.
UINT64 offset = 0 |
Definition at line 663 of file PGFimage.cpp.
*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 |
Definition at line 321 of file PGFimage.cpp.
*Sets the red |
Definition at line 1264 of file PGFimage.cpp.
* Set maximum intensity value for image modes with more than eight bits per channel* Call this method after SetHeader |
Definition at line 682 of file PGFimage.cpp.
* Reads the data of an encoded PGF level and copies it to a target buffer* without decoding UINT8* target |
Definition at line 653 of file PGFimage.cpp.
Definition at line 619 of file PGFimage.cpp.
* 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 |
Definition at line 1066 of file PGFimage.cpp.
Definition at line 322 of file PGFimage.cpp.
m_preHeader version = PGFVersion | flags |
Definition at line 849 of file PGFimage.cpp.
*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 |
Definition at line 2448 of file PGFimage.cpp.