4 ms·
I looked at both tools. They look very cool. Neither seem able to decompose an input image into smaller "tile" images. I have some very large TIFFs that I can
by JKCalhoun 5y ago
I looked at both tools. They look very cool.
Neither seem able to decompose an input image into smaller "tile" images.
I have some very large TIFFs that I cannot work with (I can't even open them in some cases!) and I would like to run them through a mill that can "paginate" the larger image into a number of smaller ones.
- jpm48 5y agoHave a look at OpenImageIO it may help. The otool can do lots, and if not you may be able to use the API's (C++ or Python) https://openimageio.readthedocs.io/en/latest/ https://openimageio.readthedocs.io/en/latest/
- JKCalhoun 5y agoThanks, so many tools to try. On MacOS I ran: % brew install openimageio But have not yet put it to task with my large files.
- pkdpic 5y agoNot sure this is of help for enormous files but slapped this ffmpeg script together with a friend a while ago for a similar need to split images for printing. Might point you in a direction at least. Excuse the virtue signaling vibe on the repo. It was a while ago. https://github.com/tombetthauser/protest_signsplitter/blob/master/sign_maker.sh https://github.com/tombetthauser/protest_signsplitter/blob/m...
- joshvm 5y agoTake a look at rasterio in Python (best installed using Conda because you need a few tricky dependencies like GDAL). It's designed for geospatial data that can be too large for RAM. You usually open data windows that are smaller views into the image. Ideally you'd have a geotiff but I don't see why it couldn't open a normal one. I've used a variant of this code to tile large aerial surveys for processing. The snippet needs a bit of cleaning but it works out of the box: https://gis.stackexchange.com/questions/306861/split-geotiff-into-multiple-cells-with-rasterio https://gis.stackexchange.com/questions/306861/split-geotiff...
- thanatos519 5y agoEasy-peasy: http://www.graphicsmagick.org/GraphicsMagick.html#details-crop http://www.graphicsmagick.org/GraphicsMagick.html#details-cr... «If the x and y offsets are omitted, a set of tiles of the specified geometry, covering the entire input image, is generated. The rightmost tiles and the bottom tiles are smaller if the specified geometry extends beyond the dimensions of the input image.»
- tobltobs 5y agoThe problem with gm and im is that both try to load the complete image into memory.
- JKCalhoun 5y agoExcellent. On MacOS I needed to do: % brew install graphicsmagick % gm convert -crop 32x32 source_image.png +adjoin image_tile%02d.png I'll have to put it through its paces on some large images this weekend.
- tobltobs 5y agoI had some very good results with https://www.libvips.org/ https://www.libvips.org/.
- JKCalhoun 5y agoThanks. On MacOS I just tried: % brew install libvips I have not (yet) had a chance to put it through its paces.