Re: Bitmap
- Posted by David Gay <moggie at INTERLOG.COM> Mar 03, 1997
- 1030 views
> How can I incorporate a bitmap image to a Euphoria program without > having to read in an external file? > > Thanks in advance > > Norm (Cheer-ing): Nooooooooooorm! Woody: Jack Frost nippin' at your nose, Mr Peterson? Norm : Yeah, now let's get Jack Beer nippin' at my liver, Woody sorry...had to do that. The only other way of having a bitmap being displayed from inside the program as opposed to accessing it as an external file is to convert it to Euphoria source statements: 1) open a file named addon.ex in text mode using open() 2) use read_bitmap() to access the external bitmap file, and then write the second element of the retrieved sequence value to file addon.ex by using print() 3) load addon.ex into an editor. Add the following in front of the sequence value written in step 2): picture = You may have to do a little extra editing to format the data. What you should have at this point is picture = {long sequence value} 3) Merge addon.ex into a program that will use the converted bitmap data and use display_image() to display the content of variable picture. Don't forget to declare picture or whatever variable you want to create in the program. This way, your bitmap data is now a part of the program, and not something you have to access the hard drive to get. David Gay http://www.interlog.com/~moggie/Euphoria "A Beginner's Guide to Euphoria"