CrImage::PNG::Writer
Inherits Reference / Object
Implements PNG Write functionality. Sample
img = CrImage::NRGBA.new(CrImage.rect(0, 0, 256, 256))
0.upto(255) do |y|
0.upto(255) do |x|
img[x, y] = Color::NRGBA.new(
(x + y) & 255,
(x + y) << 1 & 255,
(x + y) << 2 & 255,
255
)
end
end
PNG::Writer.write("test.png", img)
Class methods
write the Image to file in PNG format
write the Image to IO in PNG format