Hi,
I have a few questions about RMagick:
- How do I get the color of a specific pixel? (By giving it the
coordinates of the pixel) - How do I store parts of a picture to a file? (So like everything
between points (3,7) and (90,300))
Thanks,
Thomas
Hi,
I have a few questions about RMagick:
Thanks,
Thomas
Thomas wrote:
Hi,
Hi Thomas,
- How do I get the color of a specific pixel? (By giving it the
coordinates of the pixel)
Image.pixel_color:
http://www.simplesystems.org/RMagick/doc/image2.html#pixel_color
- How do I store parts of a picture to a file? (So like everything
between points (3,7) and (90,300))
You could use:
Image.crop(x, y, width, height)
Where x and y are the offsets of the rectangle relative to the
upper-left corner of the image. width and height are the dimensions of
your desidered region.
http://www.simplesystems.org/RMagick/doc/image1.html#crop
Cheers,
Antonio
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs