| Message: 95765 |
 |
BY: Mike Leonard (mikeleonard) DATE: 2011-01-18 17:38 SUBJECT: RE: Reproducing an ImageMagick command in RMagick Not to my knowledge, though it probably wouldn't be difficult to implement. This will almost do it, but won't work if the glyph is not perfectly centered in the image:
def trimx!
new_width = self.trim.columns
self.crop!(Magick::CenterGravity, new_width, self.rows)
end
Depending on your requirements, you could just add in some padding to account for this. | |