Convenient alias for fromImage
Returns a copy of the image
gets it as a TrueColorImage. May return this or may do a conversion and return a new image
Get image pixel. Slow, but returns valid RGBA color (completely transparent for off-image pixels).
Image height, in pixels
Set image pixel.
Image width, in pixels
Load image from file. This will import arsd.image to do the actual work, and cost nothing if you don't use it.
This provides two image classes and a bunch of functions that work on them.
Why are they separate classes? I think the operations on the two of them are necessarily different. There's a whole bunch of operations that only really work on truecolor (blurs, gradients), and a few that only work on indexed images (palette swaps).
Even putpixel is pretty different. On indexed, it is a palette entry's index number. On truecolor, it is the actual color.
A greyscale image is the weird thing in the middle. It is truecolor, but fits in the same size as indexed. Still, I'd say it is a specialization of truecolor.
There is a subset that works on both
An image in memory