| Framework | Accelerate/vImage |
| Companion guide | |
| Declared in | BasicImageTypes.h |
The vImage framework provides one function for filtering data prior to decompression.
Performs PNG decompression filtering.
vImage_Error vImagePNGDecompressionFilter( const vImage_Buffer *buffer, vImagePixelCount startScanline, vImagePixelCount scanlineCount, uint32_t bitsPerPixel, uint32_t filterMethodNumber, uint32_t filterType, vImage_Flags flags)
On input, the image data to filter. On output, the filtered data. The filtering is always applied in place.
The starting scanline.
The number of scanlines in the buffer.
The bits per pixel.
The filter method number. You must pass 0, because this is the only filtering method offered by this function.
The filtering algorithm to apply to the image data. For filter method 0, you can pass any of the constants described in “PNG Filter Types.”
The options to use when performing this operation. Set the kvImageDoNotTile flag if you plan to perform your own tiling or use multithreading. See vImage Data Types and Constants Reference for a complete description of vImage processing flags.
This function implements PNG decompression filtering for filter method 0 of the PNG standard, section 9.2, as described in: http://www.w3.org/TR/PNG-Filters.html. When a pixel that is needed for a filtering calculation falls outside the source buffer, its value is presumed to be 0.
BasicImageTypes.hFiltering algorithms to apply to image data before compressing the data.
enum
{
kvImage_PNG_FILTER_VALUE_NONE = 0,
kvImage_PNG_FILTER_VALUE_SUB = 1,
kvImage_PNG_FILTER_VALUE_UP = 2,
kvImage_PNG_FILTER_VALUE_AVG = 3,
kvImage_PNG_FILTER_VALUE_PAETH = 4
};
kvImage_PNG_FILTER_VALUE_NONENo filtering.
Available in Mac OS X v10.4 and later.
Declared in BasicImageTypes.h
kvImage_PNG_FILTER_VALUE_SUBA filter that computes the difference between each byte of a pixel and the value of the corresponding byte of the pixel located to the left.
Available in Mac OS X v10.4 and later.
Declared in BasicImageTypes.h
kvImage_PNG_FILTER_VALUE_UPA filter that computes the difference between each byte of a pixel and the value of the corresponding byte of the pixel located above.
Available in Mac OS X v10.4 and later.
Declared in BasicImageTypes.h
kvImage_PNG_FILTER_VALUE_AVGA filter that predicts a pixel value from the average of the pixels to the left and above the predicted pixel location.
Available in Mac OS X v10.4 and later.
Declared in BasicImageTypes.h
kvImage_PNG_FILTER_VALUE_PAETHA filter that predicts a pixel value by applying a linear function to the pixels located to the left, above, and to the upper left of the predicted pixel location.
Available in Mac OS X v10.4 and later.
Declared in BasicImageTypes.h
BasicImageTypes.h
Last updated: 2007-07-12