Page 1 of 1

Dividing of one image into tiles

Posted: Sun Nov 19, 2006 4:29 am
by MarS
I meed to do the following:

1 - divide an image into a 6x6 matrix of tiles
2 - save each tile into a separate file
3 - re/up-size each file with resampling/smooting

Is there a way to automate the whole process? Especially step 1


Thanks

Re: Dividing of one image into tiles

Posted: Mon Nov 20, 2006 7:54 am
by xnview
MarS wrote:I meed to do the following:

1 - divide an image into a 6x6 matrix of tiles
2 - save each tile into a separate file
3 - re/up-size each file with resampling/smooting

Is there a way to automate the whole process? Especially step 1


Thanks
In batch convert, you can add 6 times the same picture, and make cropping. Not a very easy way...

Re: Dividing of one image into tiles

Posted: Mon Nov 20, 2006 12:07 pm
by Guest
Thanks Pierre,

I accomplished the task by devising a fail-proof, repetetive series of steps:
1 - define custom selection <- x/6 x y/6

then, first cut the image into stripes:
2 - c
3 - position selection in the upper left corner
4 - a
5 - grab&drag right edge of selection to the right edge of image
6 - <Ctrl>
7 - <Ctrl>
8 - <Ctrl>
9 - c
10 - position selection in the upper left corner
11 - a
12 - grab&drag upper edge of sellection to the bottom of image
13 - grab&drag left edge of selection to the right edge
14 - <Ctrl>
15 - goto 2

and then for each strip, similarly, crop->save->undo->crop to x - x/6, and loop.

The processing of the resulting tiles was done in batch, so although the process wasn't automated, XnView made it possible, and relatively painless.

Which brings a point. I did not find any keyboard commands to (re)size/move a selection. Unless I'm missing something, it seems to be only possible with a mouse; but, on a high resolution image, in order to achieve pixel precision, the image has to be magnified, and in my case , to such a ratio that made the selection only partially visible, hence dificult to adjust.

I'd like to suggest, as a future enhancement, a keyboard manipulation of selection. One way to implement that would be to remap {<Alt>|<Ctrl>}<Arrow> keys when a cursor is over selction. Then, for example, arrow keys would move (with pixel precission) the selection, <Ctrl>arrow keys could extend the bottom/right edge of the selection, and <Alt>arrow, {<Alt>|<Ctrl>}<Shift>arrow key combinations could do something else, like accelerated operations above. Another, non-visual, way to accomplish the same could be to have a box into which one could input the x and y size of selection directly, and another to key in the upper-left corner position in the image of the selection.

Were such keyboard commands present, cutting the image into strips first would be unnecessary, for example.


All that said, thank you for a wonderful program. It made the job possible, unlike the two other tools I have.

Best regards,

MarS

xnview wrote:
MarS wrote:I meed to do the following:

1 - divide an image into a 6x6 matrix of tiles
2 - save each tile into a separate file
3 - re/up-size each file with resampling/smooting

Is there a way to automate the whole process? Especially step 1


Thanks
In batch convert, you can add 6 times the same picture, and make cropping. Not a very easy way...

Posted: Mon Nov 20, 2006 12:12 pm
by MarS
Sorry, it seems my <Ctrl> key combinations got mangled. Those were supposed to be:

6 - <Ctrl><y>
7 - <Ctrl><Shift><s>
8 - <Ctrl><z>
.
.
.
14 - <Ctrl><y>