GS bitmap problem

Håkan Stenholm hokan.stenholm@REDACTED
Thu Jun 1 20:08:45 CEST 2006


Bartolini, Antony (ABARTOLI) wrote:

>Greetings,
>
>We are having difficulty creating a bitmap image in a canvas using GS.
>We are using erl5.4.12 for both Linux and Windows. We are able to load
>a gif image into a canvas
>
>W=gs:create(window,gs:start(),[{width,400},{height,400}]),
>C=gs:create(canvas,W,[{width,380},{height,380}]),
>P=gs:create(image,C,[{load_gif,"junk.gif"}]),
>gs:config(W,{map,true}).
>
>brings up a window with a canvas containing junk.gif. No problem. But,
>when we do the same except with the {bitmap,"junk.bmp"} option instead
>of the {load_gif,"junk.gif"} as below
>
>W=gs:create(window,gs:start(),[{width,400},{height,400}]),
>C=gs:create(canvas,W,[{width,380},{height,380}]),
>P=gs:create(image,C,[{bitmap,"junk.bmp"}]),
>gs:config(W,{map,true}).
>
>We've tried enlarging the window/canvas sizes to ensure that the bitmaps
>fit but that doesn't seem to make a difference.
>
>I spent some time looking through the archives for this list but the
>search
>seems to be broken, so community help seemed like a better way to go.
>Internet searches for -- erlang gs image -- or -- erlang gs bitmap --
>didn't
>seem to turn up much either. Any pointers would be greatly appreciated.
>  
>
You should probably look for "tk bitmap" as gs is based on tk. This 
looks like a decent starting point:

http://www.mathematik.uni-ulm.de/help/perl5/doc/Tk/Bitmap.html




>Thanks,
>
>Tony Bartolini
>ARINC, Engineering Services LLC
>
>
>
>  
>




More information about the erlang-questions mailing list