Bitmap>>createPalette

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bitmap>>createPalette

Ian Bartholomew-20
The changes to Bitmap>>createPalette have cause a problem when using
DIBSection.

The following causes a walkback _if_ the target bitmap has a depth of 4
(i.e. 16 colours)

(DIBSection fromFile: 'x.bmp') createPalette

This bit of code fails...

   palEntries
    replaceFrom: 1
    to: len
    with: colors
    startingAt: 1.

#palEntries has 256 items and len is 256 but as colors only has 16 items the
replace fails.

Ian