Re: image offset
Bob Friesenhahn <[email protected]> Thu, 11 Jul 2019 11:11:12 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
If I do
% gm convert rose: -page "+22+48" crap.png
and then use the pngcheck program to see the PNG content I see that
there is an oFFs chunk with the offset I provided:
% pngcheck -v crap.png
File: crap.png (6848 bytes)
chunk IHDR at offset 0x0000c, length 13
70 x 46 image, 24-bit RGB, non-interlaced
chunk oFFs at offset 0x00025, length 9: 22x48 pixels offset
chunk caNv at offset 0x0003a, length 16
unknown private, ancillary, safe-to-copy chunk
chunk IDAT at offset 0x00056, length 6742
zlib: deflated, 16K window, maximum compression
chunk IEND at offset 0x01ab8, length 0
No errors detected in crap.png (5 chunks, 29.1% compression).
and if I then do
% gm convert crap.png crap2.png
and
% pngcheck -v crap2.png
File: crap2.png (6799 bytes)
chunk IHDR at offset 0x0000c, length 13
70 x 46 image, 24-bit RGB, non-interlaced
chunk IDAT at offset 0x00025, length 6742
zlib: deflated, 16K window, maximum compression
chunk IEND at offset 0x01a87, length 0
No errors detected in crap2.png (3 chunks, 29.6% compression).
I see that there is no oFFs chunk any more and the PNG is simpler.
This is all as if by magick and I expect that PerlMagick will respond
the same way.
In my experience, the best way to intuit how to use PerlMagick is by
reading the documentation for the 'gm' utility and testing with the
command-line utility. That is how I originally learned it and I was
one of PerlMagick's first users. :-)
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