[squeak-dev] RE: RGB (0-255) image format?

Schwab,Wilhelm K bschwab at anest.ufl.edu
Sun Sep 19 17:49:43 UTC 2010


Some searching did not turn up an answer, but I might be able to let the library "think" in 24 bbp, and then use a C function to expand the result into 32 bbp for Pharo.  Would the alpha value be 255??

Bill

________________________________________
From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Schwab,Wilhelm K [bschwab at anest.ufl.edu]
Sent: Sunday, September 19, 2010 10:55 AM
To: Pharo-project at lists.gforge.inria.fr; squeak-dev at lists.squeakfoundation.org
Subject: [Pharo-project] RGB (0-255) image format?

Is there a clever and fast way to turn an array of RGB triads (each slot taking on uint8 values from 0-255) into a Form, or better yet treat it directly as a Form?  If I understand ColorForm correctly, it uses a map and the image "pixels" are indexes into same.  In this case, I would allocate a block of memory, hand it to a library, and it would blast the RGB values all over it.  Do we have a ready way to use the result w/o having to loop over the individual values?

I am working on an interface to PLplot (http://plplot.sourceforge.net/).  It is working, but so far only if I save files to disk, which I would like to not *have* to do.  Sometimes (batches in particular), it makes sense to let the code that creates a graph save it, but I also like to do a lot of interactive plotting that should not have to hit the disk.

Bill



_______________________________________________
Pharo-project mailing list
Pharo-project at lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



More information about the Squeak-dev mailing list