nanogui: Thread: Reading and Displaying a Bitmap at runtime


[<<] [<] Page 1 of 2 [>] [>>]
Subject: Reading and Displaying a Bitmap at runtime
From: ####@####.####
Date: 4 Dec 2000 10:12:30 -0000
Message-Id: <Pine.LNX.4.10.10012041638160.5092-100000@zeus.w-o-i.com>

Dear Greg,

     I Tried to use GdDrawImageFromFile() Function in the following way,
but i am not able to see any thing in the display.

In Windows Procedure

case WM_LBUTTONDOWN:
{

      PSD psd;
  
      psd = GdOpenScreen();
      
GdDrawImageFromFile(psd,0,0,640,480,"zee.bmp",PSF_SCREEN|PSF_HAVEBLIT);

      GdCloseScreen(psd);
     
      break; 

}
        
The bitmap is in the current folder.Expecting your valuable suggestion.

Best Regards
V.R.Krishnan


Subject: Re: Reading and Displaying a Bitmap at runtime
From: "Greg Haerr" ####@####.####
Date: 5 Dec 2000 18:03:12 -0000
Message-Id: <0b5601c05ee5$f1631c60$15320cd0@gregh>

:       psd = GdOpenScreen();
:       
: GdDrawImageFromFile(psd,0,0,640,480,"zee.bmp",PSF_SCREEN|PSF_HAVEBLIT);
: 
:       GdCloseScreen(psd);

First, don't call GdOpenScreen, that's long been done before
your WinMain got called.  use &scrdev for the first argument.

Second, we're calling an engine function directly, which is not
normally supported, so all of your coordinates need to be
adjusted for the current window offset.  Check out code in
in mwin/wingdi.c to see how this is done.  You might try
looking at at SetPixel.  Basically, you need to add the
hwnd->clirect.left and hwnd->clirect.top to the x,y coords.

Finally, just pass 0 for the last parm.

Regards,

Greg


Subject: Re: Reading and Displaying a Bitmap at runtime
From: "krishnan" ####@####.####
Date: 7 Dec 2000 11:01:48 -0000
Message-Id: <007301c0603d$0c777200$8364a8c0@woi.com>

Dear Greg,

       I tried it and it is working fine.But it is rendering the bitmap very
very slowly.I could actually see the bitmap being rendered line by line .I
have configured Microwindows for x11.Is there any way i can make the Bitmap
rendering faster.

Best Regards
Krishnan


----- Original Message -----
From: "Greg Haerr" ####@####.####
To: ####@####.####
Cc: "nanoX-MailList" ####@####.####
Sent: Tuesday, December 05, 2000 11:35 PM
Subject: Re: Reading and Displaying a Bitmap at runtime


> :       psd = GdOpenScreen();
> :
> : GdDrawImageFromFile(psd,0,0,640,480,"zee.bmp",PSF_SCREEN|PSF_HAVEBLIT);
> :
> :       GdCloseScreen(psd);
>
> First, don't call GdOpenScreen, that's long been done before
> your WinMain got called.  use &scrdev for the first argument.
>
> Second, we're calling an engine function directly, which is not
> normally supported, so all of your coordinates need to be
> adjusted for the current window offset.  Check out code in
> in mwin/wingdi.c to see how this is done.  You might try
> looking at at SetPixel.  Basically, you need to add the
> hwnd->clirect.left and hwnd->clirect.top to the x,y coords.
>
> Finally, just pass 0 for the last parm.
>
> Regards,
>
> Greg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Subject: Re: Reading and Displaying a Bitmap at runtime
From: Alex Holden ####@####.####
Date: 7 Dec 2000 12:55:52 -0000
Message-Id: <Pine.LNX.4.04.10012071249160.671-100000@hyperspace.linuxhacker.org>

On Thu, 7 Dec 2000, krishnan wrote:
>        I tried it and it is working fine.But it is rendering the bitmap very
> very slowly.I could actually see the bitmap being rendered line by line .I
> have configured Microwindows for x11.Is there any way i can make the Bitmap
> rendering faster.

You could rewrite the X11 screen driver ;). This is a known problem with
the X11 driver- the Framebuffer driver should work at a reasonable speed.

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/


Subject: Re: Reading and Displaying a Bitmap at runtime
From: Jordan Crouse ####@####.####
Date: 7 Dec 2000 14:54:18 -0000
Message-Id: <3A2FA566.37D36D8C@censoft.com>

> You could rewrite the X11 screen driver ;). This is a known problem with
> the X11 driver- the Framebuffer driver should work at a reasonable speed.

True, true. But it really shouldn't be that bad.  Krishnan, what version
of Microwindows are you running?  I thought we had reduced
that problem from "unusable" to "annoying". 

Jordan

Alex Holden wrote:
> 
> On Thu, 7 Dec 2000, krishnan wrote:
> >        I tried it and it is working fine.But it is rendering the bitmap very
> > very slowly.I could actually see the bitmap being rendered line by line .I
> > have configured Microwindows for x11.Is there any way i can make the Bitmap
> > rendering faster.
> 

> 
> --
> ------- Alex Holden -------
> http://www.linuxhacker.org/
>  http://www.robogeeks.org/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
Subject: Re: Reading and Displaying a Bitmap at runtime
From: Alex Holden ####@####.####
Date: 7 Dec 2000 16:19:41 -0000
Message-Id: <Pine.LNX.4.04.10012071610060.671-100000@hyperspace.linuxhacker.org>

On Thu, 7 Dec 2000, Jordan Crouse wrote:
> True, true. But it really shouldn't be that bad.  Krishnan, what version
> of Microwindows are you running?  I thought we had reduced
> that problem from "unusable" to "annoying". 

It is like that for me when using an image with a lot of colours (eg. the
included nanogui.ppm). The problem is especially noticable when using the
new tiled background image support (annoyingly all the nice looking
background tiles I could find are unusably slow under X11). 
microwindows-0.89pre6, Pentium 166MMX, 8MB ATI Mach64,
XFree86-Mach64-3.3.3.1-1.1, 1600x1200x24bpp.

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/

Subject: Re: Reading and Displaying a Bitmap at runtime
From: Alex Holden ####@####.####
Date: 7 Dec 2000 16:28:08 -0000
Message-Id: <Pine.LNX.4.04.10012071618450.671-100000@hyperspace.linuxhacker.org>

On Thu, 7 Dec 2000, Jordan Crouse wrote:
> True, true. But it really shouldn't be that bad.  Krishnan, what version
> of Microwindows are you running?  I thought we had reduced
> that problem from "unusable" to "annoying". 

BTW, for whoever does the new X11 driver, I would reccomend taking a look
at the xmame screen driver for ideas. It uses a shared memory area for
speed and has some nice fast colour conversion code.

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/

Subject: Re: Reading and Displaying a Bitmap at runtime
From: "krishnan" ####@####.####
Date: 11 Dec 2000 07:05:26 -0000
Message-Id: <011a01c06341$28da67c0$8364a8c0@woi.com>

Mr Jordan Wrote:
> True, true. But it really shouldn't be that bad.  Krishnan, what version
> of Microwindows are you running?  I thought we had reduced
> that problem from "unusable" to "annoying".
>
> Jordan

Dear  Jordan,

     I am using 0.89pre6 Microwindows version.The applications are tested on
486 pc, 64MB and  80MHz Linux system
I will try to use the Frame buffer option and check the speed of Bitmap
rendering.Is there any other way i can try to improve the speed of
rendering.

Best Regards
Krishnan

Subject: Re: Reading and Displaying a Bitmap at runtime
From: Alex Holden ####@####.####
Date: 11 Dec 2000 07:45:33 -0000
Message-Id: <Pine.LNX.4.04.10012110740020.803-100000@hyperspace.linuxhacker.org>

On Mon, 11 Dec 2000, krishnan wrote:
> I will try to use the Frame buffer option and check the speed of Bitmap
> rendering.Is there any other way i can try to improve the speed of
> rendering.

In the case of the X driver, apparently Greg has fixed the main bug which
was causing the slow image rendering. So you can either switch to using
the Framebuffer or wait for the next Microwindows release (hopefully
soon)...

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/

Subject: Re: Reading and Displaying a Bitmap at runtime
From: Jordan Crouse ####@####.####
Date: 11 Dec 2000 15:01:16 -0000
Message-Id: <3A34ED14.B443F8B8@censoft.com>

> I will try to use the Frame buffer option and check the speed of Bitmap
> rendering.Is there any other way i can try to improve the speed of
> rendering.

Just hang on.  We have been complaining about this for so long, that
Greg is finally going to look
at improving the X11 drivers.  If you want to help, I would suggest
looking at the actual image rending routines
(engine/devimage.c) and the drawing routines (engine/devdraw.c) and see
if you can find any obvious places where
we might be slowing down.  There might be some places where we can
unroll loops by hand or cut down on memory accesses.  

Good luck and happy hacking!
Jordan
[<<] [<] Page 1 of 2 [>] [>>]


Powered by ezmlm-browse 0.20.