Published 2025-12-19
tag(s): #meta #programming
In a recent post (Decaying grandeur) I
noticed that the images resized
with IMAN[1] were...not
great.
Turns out, the original images were of lower quality than usual, because instead of coming
from the Camera app on the phone, they were shot using a messaging app. Lesson learned.
But still, I figured I could take a look at my usage of CL-GD to make sure I was saving the JPEG output in the highest quality possible. And also revisit the other "operations" I had IMAN, which were just made up manipulations of the palette that sometimes produced a grayscale version of the source image, but mostly were just senseless.
I think I had considered this library when I started working in IMAN, but since I had used
CL-GD before, I just went with that.
But, the samples in Imago's README were
alluring. And once the migration started, I found that even the code was very clear and easy
to follow.
Great library. Highly recommend. 👍[2]

On top of updating the operations, I made minor changes to the text, and added some error
handling (empty uploads, invalid links).
I coded the manipulations in the package thinking of chaining them, so you aren't forced to
process a file more than once. But to be honest, the only thing I "need" is the resize.
AND I can't think of a way to select more than one operation, in order, without JS in the
page.

A random photo I took a couple days ago, while changing my keycaps. Green tea courtesy of
Wouter's tips
on how to prepare
it properly.
Then, there's this photo Maria took a while ago, of Juan and I drinking mate in some NJ park:

I coded these filters for fun, I don't have a need for them. But at least the operations make
sense :)
Invert colors:

And here, channeling my inner Jack Baty with a B&W, or better said, grayscale, selfie. Except that mine is a digital manipulation =P
