Re: bmp viewer

Danny Uy (dau@westworld.com)
Sun, 27 Apr 1997 18:19:58 -0700 (PDT)

To subscribers of the xforms list from Danny Uy <dau@westworld.com> :

>
> To subscribers of the xforms list from Oliver Freyd <Oliver.Freyd@post.rwth-aachen.de> :
>
> Hello Danny,
>
> Your bmp viewer is very useful for me because I'm currently experimenting
> with some simple image processing routines under Xforms. The only thing I
> was missing was how to display bitmapped images in a form, without using
> pixmaps or an external viewer like xv. So now I know (more or less) how to
> use XImages in a form.

Glad to know the program can help you.

>
> Anyway, I found a small bug in your code. If you try to display the
> "winelogo.bmp" image, the program fails. Using gdb I found out that
> too little memory is malloced for the fname string.
>
> The line reads: fname = malloc( strlen( argv[1] + 5 ));
>
> and should read: fname = malloc( strlen( argv[1] ) + 5 );
>

OK. Fixed it.

Thanks.
Danny Uy
dau@westworld.com

_________________________________________________
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/xforms-archive/