Свойство | Type | Description | |
---|---|---|---|
ByteBufferSize | int | ||
ColorBufferSize | int |
Méthode | Description | |
---|---|---|
GetPixelData ( string fileName ) : |
Loads a .png image from the fileName given and returns an array of pixel colors.
|
|
Initialize ( ) : void |
Méthode | Description | |
---|---|---|
BuildPixels ( byte image, HeaderInfo &header, |
Does the remaining work to convert the byte[] containing the image into a Color[] containing colors for each pixel. This operation is different for most individual combinations of ColorType and bitDepth and currently only ColorType 2 is supported.
|
|
CheckSignature ( Stream &file ) : bool |
Checks the first 8 bytes of the file in the given Stream against the standard signature for .png images.
|
|
ConvertToType ( uint type ) : ChunkTypes |
Converts a 4-byte uint into an enumerated ChunkType
|
|
ExtractBits ( byte sourceByte, int pointer, byte bitDepth ) : byte | ||
FormUint ( Stream &bytes ) : uint |
Arranges and combines the byte values stored in byte[] bytes in order to form a uint.
|
|
GetBytesPerPixel ( HeaderInfo header ) : float |
Uses the ColorType and Bitdepth of this image to calculate the number of bytes per pixel.
|
|
GetChunkData ( Stream &file, uint length ) : byte[] |
Reads the bytes of a chunk's ChunkData segment from the Stream and returns it in a byte[].
|
|
GetNextChunk ( Stream &file, List |
Reads the length, type, data and CRC of the next chunk in the file, and then forms a Chunk struct using this data.
|
|
LoadFile ( string fileName ) : int |
Loads a file (hopefully a .png image) into a byte[].
|
|
OldMethod ( byte image, HeaderInfo &header, |
||
PaethPredictor ( int left, int up, int upLeft ) : byte |
A helper for the ReverseFilterPaeth method
|
|
ProcessChunks ( List |
Takes a List of all of the Chunks in the .png image being loaded (after IHDR is loaded and removed) and processes each Chunk appropriately before returning the compressed image. NOTE: Currently only processes the required Chunks PLTE, IDAT and IEND. Ancillary chunks are currently unsupported.
|
|
ReadFile ( Stream stream ) : int |
Reads the data in the given Stream and stores it in a byte[] that is then trimmed and returned.
|
|
ReadHeader ( List |
Processes the IHDR chunk by reading and storing all of its information in a HeaderInfo struct.
|
|
ReadImageData ( Chunk idat, byte &imageData, int &numberOfBytesRead ) : void |
Reads data from the given IDAT chunk and appends it to the List imageData.
|
|
ReadPalette ( Chunk plte, |
Processes the PLTE chunk by reading in all of the indexed color values and storing them in a PaletteInfo struct.
|
|
ReadStream ( |
Reads the decompressed(inflated) image data from an InflaterInputStream that was fed the compressed image.
|
|
ReverseFilterAverage ( byte &image, uint pointer, uint bps, float bpp, byte bitDepth ) : void |
Reverses the filtering done on a scanline of pixels that have been filtered using Method 2 (Average)
|
|
ReverseFilterPaeth ( byte &image, uint pointer, uint bps, float bpp, byte bitDepth ) : void |
Reverses the filtering done on a scanline of pixels that have been filtered using Method 3 (Paeth)
|
|
ReverseFilterSub ( byte &image, uint pointer, uint bps, float bpp, byte bitDepth ) : void |
Reverses the filtering done on a scanline of pixels that have been filtered using Method 0 (Subtract)
|
|
ReverseFilterUp ( byte &image, uint pointer, uint bps, float bpp, byte bitDepth ) : void |
Reverses the filtering done on a scanline of pixels that have been filtered using Method 1 (Up)
|
|
ReverseFiltering ( byte image, HeaderInfo header ) : byte[] |
Calls the appropriate Reverse Filtering methods to return the image to its original state.
|
public static GetPixelData ( string fileName ) : |
||
fileName | string | The name of the .png image to be loaded. |
Résultat |