1. Re: XPM Library
- Posted by "Graeme." <hmi at HYPERMAX.NET.AU> Jun 01, 1999
- 398 views
At 09:53 30/05/99 -0700, DC wrote: >I've sent Robert my latest goodie, and XPM library. An XPM encodes color >bitmaps in an ASCII-text format. This can be stored into a Euphoria program >as a text sequence, so you don't have to include external BMP files with >your application. > >Although you probably wouldn't want to use it for *huge* bitmaps, it works >fine with smaller bitmaps. > >If there is enough interest, I can create a more space-efficient library >that maps to either the default 16 bit or 256 color palette. That will cut >the size of a typical XPM in half, although it would no longer be in >standard format. Despite being a great fan of David's work I feel compelled to mention at this point that I posted a program on the RDS page in June '98 called incbm.e, which does exactly this. A quick test run on "title1.gif" from the RDS page, converted to .bmp format with PSP4 produced the following results: title1.bmp - 23.3k title1.xpm - 22.7k title1.e (incbm) - 10.1k The simplicity of the test bitmap has been kind to XPM; It more than doubled the size of some I tried it with. incbm.e is available from the utils section of the archive on the RDS page under the heading of "convert .bmp to .e" (it might trim down that minesweeper game a bit I also have an updated version that will save any euphoria object in this format. I'll tidy it up and post it, if anyone's interested. Graeme ----------------------------------------------------