[lumen logo]


This is a simple narrative description of the packages in the Lumen.Image family.

Contents


Lumen.Image

Right now this package has a couple of serious limitations:

But even with those limitations, it's still useful. It accepts a pathname, sniffs the file to determine what format it's in, and calls the appropriate format-specific routine to read and decode it into Lumen's internal image format, which is 8-bit RGBA.

That is, in Lumen images are a rectangular matrix of pixels, and each pixel is 4 bytes: one byte each for the red, green, and blue color values, and one byte of "alpha", or the pixel's level of transparency. All four values are unsigned bytes, meaning they range from 0 to 255. You can certainly also get an image from other sources besides a file, like generating it programmatically or reading it yourself; currently this package will only help you if you want to read it from a PPM or BMP file.

There's also a Complete flag in the image descriptor as returned by the From_File function. If that flag is false, the image file was truncated or otherwise corrupted and the library couldn't load the entire thing as advertised. In that case it will fill the unread part of the image values with the "transparent" pixel.


Lumen.Image.BMP

This is more or less an internal package that knows how to handle only BMP images. You'd normally use Lumen.Image instead of this one. Apps can call this package's services directly, though we can't imagine why they'd want to.


Lumen.Image.PPM

This is more or less an internal package that knows how to handle only PPM images. You'd normally use Lumen.Image instead of this one. Apps can call this package's services directly, though we can't imagine why they'd want to.



Last Updated: 14 Dec 2011 09:32:32