Re: XForms: XLib Manual - was: Show a BMP picture in Xwindow

Stefano Incontri (Helmut.Bohr@t-online.de)
17 Sep 1998 17:05:06 +0200

# To subscribers of the xforms list from Helmut.Bohr@t-online.de (Stefano Incontri) :

References: <3.0.3.32.19980916182931.008c3320@cco.matrix.com.br>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-xforms@bob.usuf2.usuhs.mil
Precedence: bulk
Reply-To: xforms@bob.usuf2.usuhs.mil

# To subscribers of the xforms list from Stefano Incontri <stefano.in@iol.it> :

Saulo Popov Zambiasi wrote:

> # To subscribers of the xforms list from Saulo Popov Zambiasi <saulopz@cco.matrix.com.br> :
>
> As I see, I will need to use XLib (XImage, XPutImage) to display
> my bitmap...
> Please, Anybody have a programming manual of XLib that can send
> by email? or have a link from Internet to I find it?
>
> Thanks...
>
> At 12:07 16/09/98 -0700, you wrote:
> >You need to create an XImage, then use XPutImage
> >to display it. Atleast i use that approach
> >to display GIFs on an xforms canvas.
> >How to make an XImage from a BMP? see source code
> >for xloadimage (some releases are called xli). Cut-n-paste..
> >==~~== fotang.
> >
> >---Saulo Popov Zambiasi <saulopz@cco.matrix.com.br> wrote:
> >> Hi all, I'm beginner with Xwindow programming.
> >> I'm work with BMP in Xwindow, I build the library to read/write
> >> BMP file format, but now I need show it in X screen. As I don't know
> >how
> >> do in Xwindow, I was thinkking in a function that display a pixel in
> >> screen and to use a loopping in this function to show all picture.
> >> Example:
> >> ________________________
> >> imageidx = 0;
> >> for (column=0; column<width; column++){
> >> for(line=0; y<line; line++){
> >> X_put_pixel_in_screen(column, line, image->red, image->gren,
> >image->blue);
> >> imageidx++;
> >> }
> >> }
>
> ---------------------------------------------------------------------
> Saulo Popov Zambiasi | /cgi-bin/exit-to?http://cco.matrix.com.br/saulopz/
> Rua Mal. Candido Rondom, 1016-E | saulopz@cco.matrix.com.br
> Cep 89806-060 - Fone 049 723-4993 | ICQ UIN: 1318716
> Chapeco - Santa Catarina - Brasil | UNOESC - Ciencias da Computacao
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuf2.usuhs.mil or see
> http://bob.usuf2.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://bragg.phys.uwm.edu/xforms
> List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/

If you look at Xlib.h header file, you'll see that a Bitmap is considered exactly as a
Pixmap.
Thus, if possible, i suggest you to use Xpm library.

Stefano

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/

-- 
Helmut Bohr                                        Helmut.Bohr@T-Online.de
						   hbohr@dvo.de        
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil   or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/