Page 1 of 2

More of my PNG-24 goodness

Posted: 2003-10-25 07:26pm
by Durandal
You may have noticed the new picture in my signature. If you're cunningly perceptive and not using Internet Explorer for Windows, you'll also notice that I didn't use any cheap tricks like making an image with the same background color as the board's or something like that. You can paste that image on to any background color and it will appear antialiased.

Like my avatar, I pulled this off with PNG-24. PNG-24 allows for 8-bit masking, which means that I can tell the viewer to display a certain pixel at one of 8 levels of opacity. Unlike my avatar, which was rather easy to do, this required a little more creativity and refinement to get the image properly sharp. At first, I rendered the equation using pdflatex at 36-point text and then scaled it down to an appropriate size to work with, as I didn't want it overflowing the horizontal scroll on people's browsers. But this produced a rather blurry final output, but I posted it anyway because I had to go off and do some drinking last night.

So I came back and refined the method a little. I kept the 36-point version, but I viewed it in Adobe Reader 6, which has sharper antialiasing than most other viewers, especially at smaller sizes. I picked a good view size (I think I settled on about 45%) and snapped a screenshot. I then opened the screenshot in Photoshop and began working. I cropped it appropriately, and copied the equation plus white space to the clipboard. I then made a new Photoshop file of appropriate size and then created an alpha channel in that file. I pasted the clipboard contents into the alpha channel and then inverted it. Then I just filled the regular channels with black, and the alpha channel basically "carved out" what it needed from the block of black pixels. Save as PNG for web with transparency, and we're in business.

Again, Internet Explorer for Windows users will not see the image as it is meant to be seen, because IE for Windows sucks ass. It has no PNG-24 support, so it gets confused by the presence of an 8-bit alpha channel and displays the image on a gray background with a 2-bit alpha channel. So you'll see the equation, but it won't be anti-aliased at all. You'll see it as if the alpha channel has only white pixels where various levels of gray should be.

Posted: 2003-10-25 07:43pm
by RedImperator
Take me now you sexy photo editor!

Posted: 2003-10-25 07:45pm
by Hamel
I'm using Firebird and it looks mighty fine 8)

But damn this browser for not letting me copy images :evil:

Posted: 2003-10-25 07:46pm
by Durandal
Hamel wrote:I'm using Firebird and it looks mighty fine 8)

But damn this browser for not letting me copy images :evil:
You can't copy an image in Firebird? Are you serious? Have you tried downloading it?

Posted: 2003-10-25 07:56pm
by Dillon
I can barely see it with using the blacksoul theme. :?

Posted: 2003-10-25 07:59pm
by Rye
observer_20000 wrote:I can barely see it with using the blacksoul theme. :?
I can see it with blacksoul...don't understand it with my soft human brain though.

Posted: 2003-10-25 08:35pm
by Hamel
Durandal wrote:
Hamel wrote:I'm using Firebird and it looks mighty fine 8)

But damn this browser for not letting me copy images :evil:
You can't copy an image in Firebird? Are you serious? Have you tried downloading it?
I can download it, and use View Image to view it in a seperate pane, but I cannot copy it directly off the page like I could with IE. I'm using 0.6.1

edit: Yeah, your avatar has a grey background in IE, and looks right in Firebird.

Posted: 2003-10-25 08:51pm
by Dalton
Hamel wrote:I can download it, and use View Image to view it in a seperate pane, but I cannot copy it directly off the page like I could with IE. I'm using 0.6.1

edit: Yeah, your avatar has a grey background in IE, and looks right in Firebird.
Even with Right Click - Save Image As?

Or are you talking about Shift-Click? It's Alt-Click now.

Posted: 2003-10-25 08:58pm
by Hamel
Dalton wrote:
Hamel wrote:I can download it, and use View Image to view it in a seperate pane, but I cannot copy it directly off the page like I could with IE. I'm using 0.6.1

edit: Yeah, your avatar has a grey background in IE, and looks right in Firebird.
Even with Right Click - Save Image As?

Or are you talking about Shift-Click? It's Alt-Click now.
Nonono, I mean right clicking on an image and having the option to copy it.

Alt clicking the image and ctrl+c won't copy it either.

Posted: 2003-10-25 09:08pm
by Durandal
observer_20000 wrote:I can barely see it with using the blacksoul theme. :?
Your monitor isn't calibrated properly then.

Posted: 2003-10-25 10:05pm
by Dalton
Hamel wrote:Nonono, I mean right clicking on an image and having the option to copy it.

Alt clicking the image and ctrl+c won't copy it either.
I'm sorry, are you actually expecting a web browser to copy image information to the clipboard?

Posted: 2003-10-25 10:26pm
by MKSheppard
Opera allows me to right click and copy the image to the clipboard. YOu
have no idea how useful this feature is.

Posted: 2003-10-25 10:32pm
by darthdavid
Thank god for mozilla 1.5, Tres bon!!!

Posted: 2003-10-25 10:48pm
by Hamel
Dalton wrote:
Hamel wrote:Nonono, I mean right clicking on an image and having the option to copy it.

Alt clicking the image and ctrl+c won't copy it either.
I'm sorry, are you actually expecting a web browser to copy image information to the clipboard?
For TOTAL clarification on what I mean:

Image

Posted: 2003-10-25 11:16pm
by Howedar
I'm not real big on the black-on-dark-gray that results in MF.

Posted: 2003-10-25 11:40pm
by darthdavid
All I can make sense of is the infinity symbol, the exponets and parentheses and the standard numbers. The rest is like some mystery code. Though i gather that all those ops have a net effect of zero judging by the fact that you start with 2 and end with 2 as well.

Posted: 2003-10-25 11:54pm
by Singular Quartet
Using Mozilla 1.3a and I can see it fine...

As to the actual math... I find it mildly sad that I can understand most of it, but am wholely unwilling to actually do out sections of it to prove that yes, 1+1 does equal 2.

I do, however, consider you a complete and utter bastard for your use of a trig identity, though.

Posted: 2003-10-26 12:47am
by Durandal
It's not my expansion. I just happened to come across it in a PowerPoint slideshow my dad sent me. It looked atrocious before I got to it with LaTeX. :)

Posted: 2003-10-26 01:13am
by Durandal
I think the white looks a lot better. :)

Posted: 2003-10-26 01:17am
by StarshipTitanic
Durandal wrote:I think the white looks a lot better. :)
Except on light blue and a slightly darker light blue.

Posted: 2003-10-26 01:40am
by Durandal
Yeah well screw SubSilver. :)

Posted: 2003-10-26 02:30am
by kojikun
Durandal, theres a simple solution: add a black outline to the white text so that on light backgrounds the outline appears and the text is visible. Here, I've done it for you:

Image

Posted: 2003-10-26 02:33pm
by Singular Quartet
Durandal wrote:It's not my expansion. I just happened to come across it in a PowerPoint slideshow my dad sent me. It looked atrocious before I got to it with LaTeX. :)
Bah. I still hate Trig, and I will continue to say that until the end of my days...

Posted: 2003-10-26 05:20pm
by Pu-239
Well there's no standard image clipboard on X(Linux), so no right click copy doesn't seem to be as annoying. There's always save as. Though it would be nice for freedesktop.org to work on standard clipboards than say, drag and drop. When was the last time you ever used this?

Posted: 2003-10-26 10:53pm
by Durandal
kojikun wrote:Durandal, theres a simple solution: add a black outline to the white text so that on light backgrounds the outline appears and the text is visible. Here, I've done it for you:

Image
Wow, how'd you end up doing it? I couldn't get the outline quite right in Photoshop, though I didn't try too hard. Thank you though.