Re: read_bitmap

new topic     » goto parent     » topic index » view thread      » older message » newer message

h  wrote:

> Why is it that when i read a bitmap and display it with display_image() it
> does not come out in the right color ? Like when the color must be blue it comes
> out yellow .
> Here is my code :
>
> include image.e
> include graphics.e
> object mode,bitmap
>
> mode = graphics_mode(18) -- I tried all the other modes
> bitmap = read_bitmap("test.bmp") -- The bitmaps name is test.bmp but it can be
>                                                   -- any other name .

you need to set the palette:
all_palette(bitmap[1]/4)

also, mode 18 only has 16 colors,  so unless you have a bitmap with 16 colors,
you'll need to use a different mode

>
>
> display_image ( { 0,0 } , bitmap [2] )
>
> I have an ATI Rage IIC 8 MB .
>
> thanks
>
> Ferdinand Greyling
> from
> Terminal Software
>
>   ------------------------------------------------------------------------
>                Name: FILE.HTM
>    FILE.HTM    Type: Hypertext Markup Language (text/html)
>            Encoding: 7bit

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu