libvips / nip2

A spreadsheet-like GUI for libvips.
https://libvips.github.io/libvips/
GNU General Public License v2.0
360 stars 13 forks source link

Chop into tiles - name of tile? #91

Closed MostHostLA closed 4 years ago

MostHostLA commented 4 years ago

Hello, My issue is probably that I'm trying to use the GUI expecting it to work like a command line.

Chop into tiles does not seem to have a way to name the tile's X and Y coordinates. Obviously, no way which way you slice the code will be stepping through the process tile by tile in a cardinal direction, and incrementing that step for the next tile. I need to also output that X and Y values during the export. Just naming them alphanumerically with increment means nothing if you are hoping to be able to find what tile to work on...

Is there maybe a hidden way to access this through the GUI with some file naming parameter magic or something similar?

jcupitt commented 4 years ago

Hello @MostHostLA,

Sorry, no. You'd need to rename the fies afterwards somehow, perhaps a bash script.

You can chop images into tiles with the vips CLI, that might work better. Save your image as a file somewhere, then run:

john@kiwi:~/pics$ vips dzsave k2.tif x --depth one
john@kiwi:~/pics$ ls x_files/0/
0_0.jpeg  0_7.jpeg  1_5.jpeg  2_3.jpeg  3_1.jpeg  3_8.jpeg  4_6.jpeg  5_4.jpeg
0_1.jpeg  0_8.jpeg  1_6.jpeg  2_4.jpeg  3_2.jpeg  4_0.jpeg  4_7.jpeg  5_5.jpeg
0_2.jpeg  1_0.jpeg  1_7.jpeg  2_5.jpeg  3_3.jpeg  4_1.jpeg  4_8.jpeg  5_6.jpeg
0_3.jpeg  1_1.jpeg  1_8.jpeg  2_6.jpeg  3_4.jpeg  4_2.jpeg  5_0.jpeg  5_7.jpeg
0_4.jpeg  1_2.jpeg  2_0.jpeg  2_7.jpeg  3_5.jpeg  4_3.jpeg  5_1.jpeg  5_8.jpeg
0_5.jpeg  1_3.jpeg  2_1.jpeg  2_8.jpeg  3_6.jpeg  4_4.jpeg  5_2.jpeg
0_6.jpeg  1_4.jpeg  2_2.jpeg  3_0.jpeg  3_7.jpeg  4_5.jpeg  5_3.jpeg

You can set tile size, overlap, format etc., see the help for dzsave.

MostHostLA commented 4 years ago

Thanks for the update and the tip.