class Hpdf::Raw::GrayImage

Overview

create a new in-memory image with gray scale. Import using Doc#load_raw_image_from_mem

Defined in:

hpdf/raw_image.cr

Constructors

Instance Method Summary

Instance methods inherited from class Hpdf::Raw::Image

color_space : Hpdf::ColorSpace color_space, height : UInt32 height, to_unsafe to_unsafe, width : UInt32 width

Constructor methods inherited from class Hpdf::Raw::Image

new(width : UInt32, height : UInt32, color_space : ColorSpace) new

Constructor Detail

def self.new(width : UInt32, height : UInt32) #

[View source]

Instance Method Detail

def []=(x : Number, y : Number, scale : Number) #

sets the gray value at x and y via scale. 0xff is white and 0x00 is black.


[View source]
def gray_at(x : UInt32, y : UInt32, scale : UInt8) #

sets the gray value at x and y via scale. 0xff is white and 0x00 is black.


[View source]