Re: image offset
Bob Friesenhahn <[email protected]> Thu, 11 Jul 2019 08:30:03 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 11 Jul 2019, mick crane wrote: > > the images are all over the place. > > I think what I want is -repage to get rid of the offset. > I'm uncertain what the offset is supposed to do because same image with or > without seems to make no difference in the viewer. > I'm not that good at Perl and need advice how to translate the gm > instructions into Perl syntax. > where would I put "-repage" ? > I also don't know how the actual .png files are constructed and wouldn't mind > a link to some resource that might help me understand how all these image > files work. It is interesting that PNG stores these offsets and that the offsets are sometimes used when the file is later used. I am not completely certain, but it may be that if you first set the image 'gravity' attribute to 'Forget' or 'NorthWest' and then set the 'page' attribute to a geometry like "+0+0" you will achive success. This is based on reading the GetImageGeometry() code in magick/image.c and the SetAttribute() code in PerlMagick/Magick.xs pertaining to the "page" attribute. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt