discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bitmap objects


From: Pete French
Subject: Bitmap objects
Date: Mon, 28 Jan 2002 16:50:31 +0000

Most of the stuff I do in OpenStep is involved with bitmaps, so I am
very interssted in expanding out the fucntionality of the GNUstep bitmaps
to handle the bitmap formats that OpenStep does - specifically tiff files
that doo not have 8 bits per sample. I generally work with 2 bits for
greyscale or 6 bits for colour -  which gives nice small tiff files but
preserves most of the colour (I am working with maps generally).

Having looked through the code the actual display is done by DPSimage
which takes the data and copies it to the screen. This assumes 8 bit
samples, and does not handle planar data. I am not really up
for changing the interface to DPSimage, so my intial thought is that if
a bitmap of non 8 bit samples is required to be rendered then it can be
upconverted to an 8 bit image inside the NSBitmapImageRep "draw" method
and then the resulting data passed to DPSimage.

The downside of this is the speed as the conversion needs to be done
every time the image is drawn (as the mage data can be manipulated directly in
memory and another raw method sent then I cannot cache the results). On the
upside, however, it is not much more effort to resize the bitmap at the
same time asdoing this conversion - thus enabling the drawInRect method
to work correctly and arbitrarily scale the image. I am assuming there is some
way of detecting the backend in useso  that I dont have to do this forthe
DGS backend where image scaling should preseuably work in the normal way?

Any comments before I leap into coding this ?

-bat.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]