News for hackers. Stuff that matters.
Re:Fred's ImageMagick Scripts by AceJohnny2 on Thursday February 17, 2022 @09:12PM (#30381377)
Tangentially, what's the 2022 take on GraphicsMagick vs ImageMagick?
Re:Fred's ImageMagick Scripts by pram on Thursday February 17, 2022 @10:30PM (#30381837)
I've never even heard of GraphicsMagick until right now.
Re:Fred's ImageMagick Scripts by johnvaluk on Friday February 18, 2022 @07:01AM (#30384637)
I have a workflow that that depends on complex ImageMagick commands that can take several minutes to run. GraphicsMagick is faster, but ImageMagick produces much higher quality results for my use case, so I stuck with it. Since they forked 20 years ago, neither is a drop-in replacement for the other and each has its own strengths.
Re:Fred's ImageMagick Scripts by pininja on Thursday February 17, 2022 @11:17PM (#30382079)
I’ve been able to make larger image montages in less time with gm compared to im with my MacBook, so I switched. I was surprised by this and could be doing something wrong, but others around me had the same experience for my situation.
Re:Fred's ImageMagick Scripts by klodolph on Thursday February 17, 2022 @10:14PM (#30381754)
I still use GraphicsMagick. In the past it was a ton faster, apparently ImageMagick changed how they do things and you can’t do a direct comparison any more.
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.

Re:Fred's ImageMagick Scripts by EarthIsHome on Friday February 18, 2022 @08:40AM (#30385535)
https://stackoverflow.com/a/56220630/2561579

TLDR:

* ImageMagick has more questions and follows on StackOverflow (read: better for getting help)

* ImageMagick has more features

* GraphicsMagick is faster with a caveat that you shouldn't use GraphicsMagick (or ImageMagick for that matter) if speed is important for you

Re:Fred's ImageMagick Scripts by fmakunbound on Friday February 18, 2022 @01:31AM (#30382755)
GraphicsMagick used to have an epic critique of ImageMagick. It’s long gone though, except maybe via archive.org
Re:Fred's ImageMagick Scripts by hparadiz on Thursday February 17, 2022 @09:41PM (#30381535)
ImageMagick I think has more institutional momentum. PHP's imagick extension for example uses it.