Smart Windows transparency?
October 12, 2005 6:55 PM   Subscribe

Are there any Windows utilities out there that use transparency in an intelligent way?

There are some Windows programs that use all-or-nothing, GIF-style transparency to shape their window. There are some that use the same percentage of transparency across their entire window in order to fade out, either in general or when they're not active. There are utilities that can apply both of those examples to existing programs.

But no one seems to use proper alpha channel transparency to, for example, allow things to show through the background, but still have completely opaque text. A telnet client or even web browser that fades out the background at maybe 50%, but leaves the text and other forground objects at 100% would be great for being able to see what's going on behind the top window without making text unreadable. Does anyone know any Windows programs that use what I guess could be called "dynamic alpha channels" in this way?

(Note; There are some utilities that fake it by showing only the background wallpaper in the background of a window. I'm not after these.)
posted by krisjohn to Computers & Internet (15 answers total)
 
what about trillian instant messenger? you can change any window's transparency value in increments of 10%. i dont use it but it's pretty neat.
posted by freudianslipper at 7:03 PM on October 12, 2005


I'll second trillian, also konfabulator allows you to set the transparency value as well. Konfabulator lets you use widgets (like on the mac) for windows, great program.
posted by pwally at 7:15 PM on October 12, 2005


It's been a while since I used either, but I think both Trillian and Konfabulator fall into the "same percentage of transparency across the entire window" category. What krisjohn wants sounds like something completely different. I'm not a Windows expert, so maybe someone can correct me, but I don't think the Windows graphics engine supports element-level transparency, as opposed to window-level transparency. Maybe in the next graphics engine to be included with Windows Vista?
posted by stopgap at 7:30 PM on October 12, 2005


Response by poster: Thanks, Konfabulator looks like it might have widgets that do what I'm looking for, but I think Trillian is like Miranda IM; The whole window is faded equally, making the text harder to read.
posted by krisjohn at 7:30 PM on October 12, 2005


Response by poster: stopgap is right. The closest example I can find is Putty Magic but it overlays a window on the real putty client and I couldn't keep the transparency in sync with the text (ie; I couldn't get it to work). But at least the screen shots there might give you a better idea of what I'm after.
posted by krisjohn at 7:34 PM on October 12, 2005


You don't use GIF-style transparency to shape the window. The Win32 API will accept all manner of primitives (boxes, rounded boxes, circles, bezier curves, etc.) for shaping the window. What you do is then throw a bitmap over this shape. Since Windows doesn't antialias (I'm going to throw out the blanket assumption that Windows Vista will) the result looks like binary GIF transparency when it's really just aliasing.

You can implement real 32-bit RGBA bitmaps and thus get a full 8-bit alpha channel within Win32 that is supported by most versions of Windows (I want to say Windows 98 and up but it has been 3-4 years since I messed around with this stuff) however it is almost impossibly difficult for someone relatively new to Win32 API. This background bitmap has no bearing on your app's edge-detection in terms of handling mouse events and such, as that is defined by simple primitives.

Here's a helpful link on the topic, but IIRC it's only useful as a pointer in the right direction - it's useless as an implementation of what you're talking about (ie transparent background image but solid lettering layered over another app). Back when I was a half-decent programmer I spent a couple days trying to properly integrate libPNG with Win32 API and quit in frustration. As much as I know Microsoft is going to fuck up the new Windows API by turning it into some MFC-like bloated behemoth with Vista, it's nice to know there will almost certainly be good support for things like this.
posted by Ryvar at 7:45 PM on October 12, 2005


how is trillian "faking" its transparency? I dont believe it is.
posted by freudianslipper at 8:17 PM on October 12, 2005


freudian: this is just blanket suspicion not rooted in any personal knowledge, but I think there's an API call to set an entire window to an arbitrary level of transparency. That's different than alpha-blending a background bitmap against the windows and desktop underneath it while keeping the fonts solid.
posted by Ryvar at 8:26 PM on October 12, 2005


Response by poster: Trillian isn't faking its transparency. However it's also not setting the background transparency different to the text transparency. For example: White text and a blue background with a black desktop and 50% transparency will result in a dark blue background and grey text. I want the text to remain white.
posted by krisjohn at 8:39 PM on October 12, 2005


damnit. i completely missed your point about the text. sorry krisjohn :)
posted by freudianslipper at 8:43 PM on October 12, 2005


Ryvar: There *is* an API call to set your own transparency.

Re: question - the only app that I know of that uses transparency semi-intelligently is the System Mail notification hooked by Outlook and Mozilla. It displays a message in a small window which fades out over five or so seconds.

If you mouse over it, it becomes completely opaque, but otherwise will fade to nothing. Rather handy.
posted by unixrat at 9:08 PM on October 12, 2005


Not to snark, but this really isn't such a good idea. You'd need to be approaching 75% background opacity anyway for the text to remain reliably readable, say, over a desktop photograph (I learned this through trial and error while updating my photoblog to a spiffy text-overlay layout) — and stacking text windows? Forget it.

Right now I have an IM window, two browser windows, HTML-Kit, and Photoshop open. While it would be neat to be able to track the windows better visually, the text-upon-text-upon-text layering would be a nightmare for readability.
posted by rafter at 11:24 PM on October 12, 2005


I'm not sure if this meets your requirements, but Samurize can do a lot of stuff, some of which seems like it might be what you're looking for. It's not technically smart transparency (because it's using layers), but it can look like it, if that's all you need.
posted by Who_Am_I at 6:23 AM on October 13, 2005


TextPad does this with the search window on W2K/XP. The dialog box fades to about 60% transparent but all text on the dialog stays the same.
posted by Mitheral at 6:49 AM on October 13, 2005


Hi. I worked on the now-defunct Sonique 2 media player, so I know a bit about this.

Windows supports 3 things that can be thought of as transparency:

You can set the region to something other than a rectangle
You can set per-window transparency
You can set per-pixel transparency (windows 2k and ME and up)

At least in 2000-2001 when I was actively doing this kind of thing, having more than a couple per-pixel alpha windows going at a time got pretty slow. This could be driver specific though.

I'm pretty sure this is the same thing that XP does for the mouse cursor drop shadow, btw.

If you can find a copy of Sonique2, you should pretty easily be able to find skins that do some per-pixel stuff like drop shadows and antialiased edges and whatnot. I don't recall seeing any that did what you said with text, but it should be pretty easy in MML (the Sonique2 skinning language), though good luck finding the docs these days (lycos's vhost entry for it seems broken)
posted by aubilenon at 11:01 AM on October 13, 2005


« Older McMefi Recycling   |   Fugly CDMA Newer »
This thread is closed to new comments.