Please correct me if I'm wrong, but for the last method the offset is always +0+0:
# trim
convert negated.png -trim +repage negated_trim.gif
# print first row
convert negated_trim.gif[210x1+0+0] txt:
# ImageMagick pixel enumeration: 210,1,255,gray
0,0: (255,255,255) #FFFFFF gray(255,255,255) --- white
...
# Offset from orignal image
convert negated_trim.gif -format "%O" info:
+0+0
thank you,
--vs
Corner squares coord+size detection
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Corner squares coord+size detection
Use
convert negated.png -format "%@" info:
or
identify -format "%@" negated.png
210x210+45+45
to get the trim offsets and size without having to do a trim without +repage. see http://www.imagemagick.org/script/escape.php
(Or do a second trim, but leave off the +repage and then get the geometry.)
see how I packaged it all compactly at http://studio.imagemagick.org/discourse ... 112#p85956
convert negated.png -format "%@" info:
or
identify -format "%@" negated.png
210x210+45+45
to get the trim offsets and size without having to do a trim without +repage. see http://www.imagemagick.org/script/escape.php
(Or do a second trim, but leave off the +repage and then get the geometry.)
see how I packaged it all compactly at http://studio.imagemagick.org/discourse ... 112#p85956
Re: Corner squares coord+size detection
hi,
2nd solution with pixel enumeration working great now!!!
Thanks a lot!
--vs
2nd solution with pixel enumeration working great now!!!
Thanks a lot!
--vs