Best way (morph) for working with pixels
Bob Arning
arning at charm.net
Wed Feb 20 19:31:53 UTC 2002
On Wed, 20 Feb 2002 09:45:32 +0100 HNBeck at t-online.de (Hans N. Beck) wrote:
>which morph may be the best for the following problem:
>I want to read a picture from file (bmp, gif) and then
>manipulating the picture pixel for pixel, i.E. for
>implementing special picture operations.
>
>I've tried the ImageMorph with it's ColorForm inside, but it
>uses a colormap. But I would like to say "pixel x y set the value
>red 0.4 green 0.6 blue 0.0", regardless if this color is in any colormap
>or not (which is necessary for the colorAt: put: method of colorform).
Then you would probably do better using a Form of depth 16 or 32. If the image you have to start with is only 8 bits, then convert it using
ImageMorph new
image: (myEightBitImage asFormOfDepth: 16);
openInWorld.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|