RE: About XPMmer

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello Igor.

I got a revised version of XPMmer going over the weekend, I now extract 
C-comments OK, handle 48-bit colors OK, handle color names like 
SkyBluePink OK. I don't handle 2-character color codes which at least 
one of your examples has. But I can read most of them in - 98% anyway.
I have a new palette which is more uniform, and produces quite a good 
match with all the icons I have tried. I will upload to RDS later on
today if I can - otherwise Wednesday as I am out tomorrow all day.
Thanks so much for your examples - I didn't realise there were so
many variants. And there are more I can't explain. Does anyone know 
where I can get a definition of xpm format rather than just a chatty 
description?
Andy

Igor Kachan wrote:
> 
> 
> posted by: Igor Kachan <kinz at peterlink.ru>
> 
> Andy Drummond wrote:
>  
> > 
> > Igor,
> > I think a bigger problem is going to be handling the 48-bit color values
> > that some of your XPMs hold! I was just tossing the "#FF8000" type of
> > number at value() and all was well. But "#BFBFBFBFBFBF" is too much for
> > Euphoria to handle!!
> 
> I'm not enough sure, but one of the simplest ways seems just to be:
> 
> }}}
<eucode>
> 
> if length(s) > 7 then -- "#BFBFBFBFBFBF"
>         s = s[1..7]   -- becomes "#BFBFBF", almost same color
> end if
> 
> </eucode>
{{{

> 
> At least for those 40 icons of that .zip, it could work.
> 
> > I shall have to write my own analyser - or else
> > I'm sorry, you can't use these XPMs.  I did not expect my reader to
> > cope with every possible XPM, but it would be nice to do most anyway.
> 
> Just output  - "Unsupported variant of XPM file format", instead of
> something not enough clear about problems with "value()" or such.
> 
> > More thinking this weekend, I suppose!!
> 
> Good Luck!
> 
> Regards,
> Igor Kachan
> kinz at peterlink.ru

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu