Sha256: fed6320bce43b5a9ccf5462b277d030284f5b4a1e552796c99d7abed2af20293

Contents?: true

Size: 909 Bytes

Versions: 12

Compression:

Stored size: 909 Bytes

Contents

#ifndef OILY_PNG_PNG_ENCODING_H
#define OILY_PNG_PNG_ENCODING_H

#define FILTER_BYTE(byte, adjustment)  byte = (BYTE) (((byte) - (adjustment)) & 0x000000ff)
#define ENCODING_PALETTE_INDEX(encoding_palette, pixels, width, y, x) (((x) < (width)) ? ((BYTE) NUM2UINT(rb_hash_aref(encoding_palette, rb_ary_entry(pixels, (y) * (width) + (x))))) : 0)

typedef void(*scanline_encoder_func)(BYTE*, VALUE, long, long, VALUE);

/*
  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 bit_depth, VALUE filtering);

#endif

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
oily_png-1.2.1 ext/oily_png/png_encoding.h
bench9000-0.1 vendor/oily_png/ext/oily_png/png_encoding.h
oily_png-1.2.0 ext/oily_png/png_encoding.h
oily_png-1.1.2 ext/oily_png/png_encoding.h
oily_png-1.1.1 ext/oily_png/png_encoding.h
oily_png-1.1.0 ext/oily_png/png_encoding.h
oily_png-1.0.3 ext/oily_png/png_encoding.h
oily_png-1.0.2 ext/oily_png/png_encoding.h
oily_png-1.0.1 ext/oily_png/png_encoding.h
oily_png-1.0.0 ext/oily_png/png_encoding.h
oily_png-1.0.0.rc2 ext/oily_png/png_encoding.h
oily_png-1.0.0.rc1 ext/oily_png/png_encoding.h