Re: Display Picture.

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

Hello Sam,

read_bitmap( ) can only read in 256 color images and cannot handle RLE encoded
images.

Personally I use 256 color images because there is a good chance that later down
the
road in your development you will be pressed with having to have the ability to
to
run or display your program on a computer that isnt equiped with hardware to
handle
any higher resolution that 640 width - 480 height - 256 colors. You should keep
this in
mind when you start a project by asking who your target audience will be. If its
an desktop
application for business this is certain to be an issue. On the other hand, if
you're a gamer
then high color sure makes for a nice look but there is a penalty that must be
paid for
the higher color, in speed. If you can hone the talent of the DOS world and
there are some
nice looking games written that only use 256 colors in DOS then you'll be better
off in future endevores.

Im saying this because I myself fell into this lazy way of graphics handling and
only recently
did I discover how Windows handles palettes and this came after writing
thousands of lines
in a nice GUI only to re-write code due to the very fact that my app would not
look or
function properly on the lesser machines.

Hopefully words of wisdom and if I can help you with this I certainly will..

Euman
euman at bellsouth.net

5 2 1 - 1 - n - 5  The Doors  
----- Original Message ----- 
From: "Sam" <samuelc at teleport.com>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, April 08, 2002 9:33 PM
Subject: Display Picture.


> 
> Hi ...
> 
>    Appreciate the answers I've gotten from you guys. Hope you can come 
> up with one more. I can't seem to get Euphoria to display a picture.
> 
>   include image.e
>   sequence Pic1
>   Pic1 = read_bitmap ("C:\\Euphoria\\MyPic.Bmp")
> 
>   Got message "type_check failure, MyPic is 1" 
> 
>    Tried a different picture. This time, for variety, I got, "type_check 
> failure, DiffPic is 3."
> 
>    Wasn't going to give up that easily though. Changed the program 
> slightly.
> 
>    include image.e
>    object Pic1
>    Pic1 = read_bitmap ("C:\\Euphoria\\MyPic.Bmp")
> 
>    Hey! No error msg. this time!
> 
>    So I added a line:
> 
>    display_image ({100, 20}, Pic1 [2])
> 
>    This time I got, "attempt to subscript an atom
>                      (reading from it)"
> 
>    So then I tried to run the `Bitmap.ex' program in the demo\dos32 
> directory. Tried three different pictures. One showed up on screen, but 
> only the bottom 20 percent. The other two get msg, `unsupported format.' 
> 
> 
>    Any idea??
> 
>    Thanks,
> 
>    Sam 
> 
> 
> 
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu