News for hackers. Stuff that matters.
Re:Fred's ImageMagick Scripts by JKCalhoun on Friday February 18, 2022 @12:22AM (#30382418)
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.

Re:Fred's ImageMagick Scripts by joshvm on Friday February 18, 2022 @02:43AM (#30383131)
Take 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...

Re:Fred's ImageMagick Scripts by pkdpic on Friday February 18, 2022 @02:38AM (#30383112)
Not 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/m...

Re:Fred's ImageMagick Scripts by thanatos519 on Friday February 18, 2022 @03:10AM (#30383290)
Easy-peasy:

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.»

Re:Fred's ImageMagick Scripts by JKCalhoun on Friday February 18, 2022 @11:15PM (#30394383)
Excellent. 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.

Re:Fred's ImageMagick Scripts by tobltobs on Friday February 18, 2022 @07:00AM (#30384632)
The problem with gm and im is that both try to load the complete image into memory.
Re:Fred's ImageMagick Scripts by jpm48 on Friday February 18, 2022 @02:08AM (#30382934)
Have 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/
Re:Fred's ImageMagick Scripts by JKCalhoun on Friday February 18, 2022 @11:24PM (#30394423)
Thanks, so many tools to try. On MacOS I ran:

% brew install openimageio

But have not yet put it to task with my large files.

Re:Fred's ImageMagick Scripts by tobltobs on Friday February 18, 2022 @06:46AM (#30384542)
I had some very good results with https://www.libvips.org/.
Re:Fred's ImageMagick Scripts by JKCalhoun on Friday February 18, 2022 @11:19PM (#30394402)
Thanks. On MacOS I just tried:

% brew install libvips

I have not (yet) had a chance to put it through its paces.