RE: bmp viewer

Oliver Freyd (Oliver.Freyd@post.rwth-aachen.de)
Sun, 27 Apr 1997 15:23:22 +0200 (MET DST)

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.

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 );

then everything works fine!

Anyway, many thanks for the effort to write that program!

Bye, Oliver

On 24-Apr-97 Danny Uy wrote:
>To subscribers of the xforms list from Danny Uy <dau@westworld.com> :
>
>There is now a simple bmp file viewer available at my web page. Take a look
>at /cgi-bin/exit-to?http://www.westworld.com/~dau/xbmp for sources and some sample images to
>test with.
>
>Danny Uy
_________________________________________________
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/