pyvips icon indicating copy to clipboard operation
pyvips copied to clipboard

nip2 vs. vips to join image tiles to bigtif

Open cadi088 opened this issue 5 years ago • 3 comments

Hi,

I usually use nip2 to join multiple image tiles to one large dataset (using image, join, array) and export the dataset to bigtif files (e.g. 250.000 x 150.000 pixels). However, I sometimes get errors and the export doesn't work, maybe because of even larger datasets. So I want to try vips now instead of the GUI. Does someone have a good documentation how to use VIPS to join an array of e.g. 15x8 images?

Best regards, Carsten

cadi088 avatar Feb 28 '20 15:02 cadi088

You can do this at the command-line:

vips arrayjoin "a.tif b.tif c.tif d.tif" out.tif[bigtiff,compression=jpg,tile] --across 2

Will join up a, b, c and d in a grid two images across, as:

a b 
c d

And save as a jpeg-compressed tiled bigtiff image.

https://libvips.github.io/libvips/API/current/libvips-conversion.html#vips-arrayjoin

jcupitt avatar Feb 28 '20 16:02 jcupitt

@jcupitt does the arrayjoin work with pyramid files?

mth-gsk avatar Oct 29 '20 15:10 mth-gsk

Yes, it should do. Just enter:

vips arrayjoin "a.tif b.tif c.tif d.tif" out.tif[bigtiff,compression=jpg,tile,pyramid] --across 2

ie. add a pyramid option, and it'll generate a bigtiff pyramid.

jcupitt avatar Oct 29 '20 15:10 jcupitt