"Prasad Burra" on wrote...
| Hi all,
|
| I have a Picture.png.
|
| I used 'convert' to scale it down and called it Picture30.png
|
| I want to crop Picture.png and Picture30.png into same number of pieces.
|
| i.e. The number of Pieces from both the above pictures should be same.
|
| I tried the following :
|
| convert -crop 20% Picture.png // this results in 33 cropped / tiled peices
| convert -crop 20% Picture30.png // this resulted in 29 cropped / tiled
peices.
|
| The relation between Picture.png and Picture30.png is
|
| convert -scale 30% Picture.png Picture30.png
|
| can some body help me with this. ??
| thank you very much in advance.
|
>From IM Examples, Cutting and Bordering,
Tile Cropping, sub-dividing one image into multiple images
http://www.imagemagick.org/Usage/crop/#crop_tile
=======8<--------
It is currently NOT posible to sub-divide an image directly into a
specified number of tiles.
You could do the maths and work out the tile size for the above Tile
Cropping, but that will only work correctly for images that sub-divide
exactly by the number of tiles wanted. If it does not then you will be
left with a set of small 'reminder' tiles along the bottom and right
edges, and probably the wrong number of images as well.
For example try to sub-divide a 100x100 pixel image into 30x30 tiles
will not work very well. Using "-crop" with 'best fit' of 3x3 pixels,
you will get 33 row/columns of images with a one pixel wide remainder
image on the ends. You will never get your requested 30x30 images
wanted.
IM really needs an option to subdivide images, as equally as posible.
Such an operator will produce some rows and column of tiles that are
say one pixel smaller or larger than neighbouring rows and columns, but
the tiles will be reasonably equal.
Does anyone have a script to do this?
=======8<--------
Sorry. It is not posible to do as you describe at this time.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
Bad Command or File Name. Good try, though!
Bad Command or File Name. You have 2 wishes left.
Bad command or file name! Go stand in the corner.
Bad command. Bad, bad command! Sit! Stay! Staaay...
-----------------------------------------------------------------------------
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