Sha256: 2a7c7a1098336ae65e02f573df1e4fa57e9c0f89f9b92c3c7252a588ed6641a6

Contents?: true

Size: 893 Bytes

Versions: 4

Compression:

Stored size: 893 Bytes

Contents

#ifndef PNG_ENCODING_H
#define PNG_ENCODING_H

#define R_BYTE(pixel)  ((BYTE) (((pixel) & (PIXEL) 0xff000000) >> 24))
#define G_BYTE(pixel)  ((BYTE) (((pixel) & (PIXEL) 0x00ff0000) >> 16))
#define B_BYTE(pixel)  ((BYTE) (((pixel) & (PIXEL) 0x0000ff00) >> 8))
#define A_BYTE(pixel)  ((BYTE) (((pixel) & (PIXEL) 0x000000ff)))

#define FILTER_BYTE(byte, adjustment)  byte = (BYTE) (((byte) - (adjustment)) & 0x000000ff)

/*
  Encodes an image and append it to the stream.
  A normal PNG will only have one pass and call this method once, while interlaced
  images are split up in 7 distinct images. This method will be called for every one
  of these images, reusing the stream.
  
  This function should replace ChunkyPNG::Canvas::PNGEncoding.encode_png_image_pass_to_stream
*/
VALUE oily_png_encode_png_image_pass_to_stream(VALUE self, VALUE stream, VALUE color_mode, VALUE filtering);

#endif

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oily_png-0.2.0 ext/oily_png/png_encoding.h
oily_png-0.1.1 ext/oily_png/png_encoding.h
oily_png-0.1.0 ext/oily_png/png_encoding.h
oily_png-0.0.8 ext/oily_png/png_encoding.h