1. Read_bitmap and Display_picture shows up crazy!

I'm having trouble getting read_bitmap and display_picture to work. 
Here's my code:


include graphics.e
include image.e

object ii
ii = graphics_mode(261)
pixel(RED, {40,30})
object carbuncle
carbuncle = read_bitmap("C:\\Euphoria\\Pics\\blat.bmp")
display_image({100,100},{{7,6,2,46,5,5,5,5,5},
                         {4,3,23,45,45,45}})
all_palette(carbuncle[1]/4)         
display_image({200,600},carbuncle[2])                       
object c
c = wait_key()


The bitmap shows up, but it's all jumbled up and in the wrong position. This
happens with different bitmaps I try, and they are all supposed to be in the
right format.

new topic     » topic index » view message » categorize

2. Re: Read_bitmap and Display_picture shows up crazy!

David wrote:
> 
> 
> I'm having trouble getting read_bitmap and display_picture to work. 
> Here's my code:
> 
> 
> include graphics.e
> include image.e
> 
> object ii
> ii = graphics_mode(261)
> pixel(RED, {40,30})
> object carbuncle
> carbuncle = read_bitmap("C:\\Euphoria\\Pics\\blat.bmp")
> display_image({100,100},{{7,6,2,46,5,5,5,5,5},
>                          {4,3,23,45,45,45}})
> all_palette(carbuncle[1]/4)         
> display_image({200,600},carbuncle[2])                       
> object c
> c = wait_key()
> 
> 
> The bitmap shows up, but it's all jumbled up and in the wrong position. This
> happens with different bitmaps I try, and they are all supposed to be in the
> right format.

David:

Take a look at the use_vesa() command.
Some video cards require you to use the following at the top of your
program so that it will force vesa mode 261 to work properly.

include machine.e
use_vesa(1)


Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu