1. read_bitmap
- Posted by =?iso-8859-1?B?aAU=?= <mwfch at MWEB.CO.ZA>
Jun 27, 2000
-
Last edited Jun 28, 2000
------=_NextPart_000_0010_01BFE07F.4B150380
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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 =3D graphics_mode(18) -- I tried all the other modes
bitmap =3D read_bitmap("test.bmp") -- The bitmaps name is test.bmp but =
it can be
-- any other name .
display_image ( { 0,0 } , bitmap [2] )
I have an ATI Rage IIC 8 MB .
thanks
Ferdinand Greyling
from
Terminal Software
------=_NextPart_000_0010_01BFE07F.4B150380
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Why is it that when i read a bitmap and =
display it=20
with display_image() it does not come out in the right color ? Like when =
the=20
color must be blue it comes out yellow .</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Here is my code :</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>include image.e</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>include graphics.e</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>object mode,bitmap</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>mode =3D graphics_mode(18) -- I =
tried all the=20
other modes</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>bitmap =3D read_bitmap("test.bmp") -- =
The bitmaps=20
name is test.bmp but it can be</FONT></DIV>
<DIV><FONT face=3DArial=20
nbsp; =20
-- any other name .</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>display_image ( { 0,0 } , bitmap [2] =
)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I have an ATI Rage IIC 8 MB =
.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Ferdinand Greyling</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>from</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Terminal =
------=_NextPart_000_0010_01BFE07F.4B150380--
2. Re: read_bitmap
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