
"embossed" (disabled) icon
Quote:
> This could go on for a while..
Pros and Cons to both methods.
Quote:
> The system colours should always be set in the palette, you only should use
> the first 245 or so (I forget the exact number) entries for the local
> palette.
I use the standard VC++ 5/6 HalfTone palette, which includes the system colors.
Quote:
> Oh I totally agree, Microsoft's 'dithering' in DrawState() is terrible and a
> dithered image embossed just looks plain wrong since there's a mess of
> pixels being drawn all over the place in mid-range colours. I wouldn't even
> go for a better dithering method for this, it's not a case where dithering
> would help, a simple tolerance check would be far more suited.
A weighted conversion to greyscale followed by a line art conversion with a 191
threshold is close (using Corel PhotoPaint). I've found that it still doesn't
catch all of the exact pixels within the image as it should and requires a
slight touchup. I've messed with a bunch of various techniques over the years
and simply settled on using multiple ImageLists and a Palette adjuster for the
3D/Text color setting.
I would be interested to see if you created one in code that actually worked
100%.
Even creating the Normal and Disabled from the Hot image would be cool.
Note that the Normal isn't just a standard greyscale convert of the Hot, as the
Hot usually has higher contrast than the Normal, so you would have to weight the
greyscale within a curve where the lowest would be 102:102:102.
David
lilchips.com
Quote:
> > Agreed, however... ;-)
> This could go on for a while..
> > I find that especially on 256 color [or true-color] images, the standard
> > API-type embossing methods result in something that is usually impossible
> to
> > discern what it is (or was).
> > Hence I usually manually create the embossed image so that I have complete
> > control over setting various areas of the image into "simpler" or
> "flatter"
> > layout. I would hazard a guess as to this also being why MS uses the
> three
> > images.
> The system colours should always be set in the palette, you only should use
> the first 245 or so (I forget the exact number) entries for the local
> palette.
> > See the attached image as an example.
> > The first button shows my 256 color "XP"-like Search icon as Hot, the
> second
> > button is Normal, the third is how Windows shows it disabled (blech!), the
> > fourth is my hand-made Disabled bitmap.
> Oh I totally agree, Microsoft's 'dithering' in DrawState() is terrible and a
> dithered image embossed just looks plain wrong since there's a mess of
> pixels being drawn all over the place in mid-range colours. I wouldn't even
> go for a better dithering method for this, it's not a case where dithering
> would help, a simple tolerance check would be far more suited.
> > I use the APIs to attach three ImageLists to the Toolbar Control, for Hot,
> > Normal, Disabled.
> > The triple ImageList method is what MS uses, and also what I recently
> adopted
> > since I found it easier to use and gives me more flexibility.
> To be honest I've not done much work with tool bars in this way and seldom
> use ImageLists but I'm sure it works just fine.
> > I have a function that automatically sets the palettes correctly for the
> images
> > in the Disabled ImageList, so that they follow the system colors. It is
> fast as
> > it only modifies the Hilight/Face/Shadow/Text palette entries in the
> standard
> > HalfToning palette (I use this for all my 256-color UI images).
> > I also use the palette setting function for things like Command Buttons
> that are
> > set to Graphical Style. As you mention, most people are lazy and leave
> them as
> > black (or whatever), but I make sure my Button 3D and Button Text colors
> follow
> > the current scheme.
> > But please, don't discontinue your work on creating a better embosser just
> > because of me. :-)
> It's just a bit of fun:
> Http://EDais.Earlsoft.co.uk/TempFiles/IconStates.exe
> It's cheesy, slow code as I just wanted to get something working.
> Mike
> -- EDais --
> - Microsoft Visual Basic MVP -
> WWW: Http://EDais.earlsoft.co.uk/