Class Graster::Image
In: lib/graster/image.rb
Parent: Object

Methods

[]   build_spans   each_row   f_to_pix   from_file   hash   new   pix_to_f  

Constants

PROPS = [:filename,:size,:pixels]

Attributes

spans  [R] 

Public Class methods

"encode" a float 0..1 to a pixel

"decode" an encoded pixel to a float 0..1

Public Instance methods

get pixel(s) from x,y coords 0,0 is bottom,left image[x,y] => pixel at x,y image[y] => row at y

convert bitmap data to spans (or runs) of contiguous pixels also invert the Y axis

[Validate]