class Iup::ImageRGB
Image
made from RGB values.
Public Class Methods
new(width, height, pixels, &block)
click to toggle source
Constructor creates an image from raw pixels, using 3-values per pixel.
- width
-
width of image in pixels
- height
-
height of image in pixels
- pixels
-
an array of pixel values
- block
-
an optional block to set attributes
# File lib/wrapped/image.rb, line 96 def initialize width, height, pixels, &block @handle = IupLib.IupImageRGB width, height, IupLib.pointer_from_chars(pixels) # run any provided block on instance, to set up further attributes self.instance_eval &block if block_given? end