Markus Boelter on wrote...
| Hi!
|
| I have a problem with "convert -crop": As source-image, I have a .gif
| which is 256 x 384 pixel big. I will "cut" this image into 6 tiles
| with 128 x 128 pixel each. To do that, I execute:
|
| convert -crop 128x128 srcimage.gif tile_%d.gif
|
| I _expect_ to get 6 tiles with each 128x128 pixel, but I get 6 tiles
| with 256x384 pixel each. It is the correct "part" of the tile
| included and the rest is just plain white. But why are the results so
| big?
|
Actually you get 6 images of 128x128 pixels each, but positions on a
virtual canvas that is 256x384.
This lets the image detail where the image originated on the original
canvas, allowing you to say filter them to rename the files into a
tile_{X}x{Y}.gif
type name format (I haven't written a script to do this yet, but plan
to.
If you don't want that canvas-position information, remove it with a
+repage operator.
Also, it is better to actually operate on your image AFTER you read it
in as it is more logical, and the correct methodology for IM version 6.
EG:
convert srcimage.gif -crop 128x128 +repage tile_%d.gif
For more detail, as well as methods for re-joining pieces, see...
Tile Cropping, sub-dividing one image into multiple images
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/crop/#crop_tile
The IM examples details many things you will be wanting to do. Have a
look though it.
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/
Enjoy.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
Last week, when the moon was full, the clouds were thick, and
formahaut was above the horizon, I typed f77, and lo, it did compile.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users