More of my PNG-24 goodness
Moderator: Beowulf
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
More of my PNG-24 goodness
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.
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.
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
- RedImperator
- Roosevelt Republican
- Posts: 16465
- Joined: 2002-07-11 07:59pm
- Location: Delaware
- Contact:
Take me now you sexy photo editor!
Any city gets what it admires, will pay for, and, ultimately, deserves…We want and deserve tin-can architecture in a tinhorn culture. And we will probably be judged not by the monuments we build but by those we have destroyed.--Ada Louise Huxtable, "Farewell to Penn Station", New York Times editorial, 30 October 1963
X-Ray Blues
X-Ray Blues
I'm using Firebird and it looks mighty fine
But damn this browser for not letting me copy images
But damn this browser for not letting me copy images
"Right now we can tell you a report was filed by the family of a 12 year old boy yesterday afternoon alleging Mr. Michael Jackson of criminal activity. A search warrant has been filed and that search is currently taking place. Mr. Jackson has not been charged with any crime. We cannot specifically address the content of the police report as it is confidential information at the present time, however, we can confirm that Mr. Jackson forced the boy to listen to the Howard Stern show and watch the movie Private Parts over and over again."
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
You can't copy an image in Firebird? Are you serious? Have you tried downloading it?Hamel wrote:I'm using Firebird and it looks mighty fine
But damn this browser for not letting me copy images
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
I can see it with blacksoul...don't understand it with my soft human brain though.observer_20000 wrote:I can barely see it with using the blacksoul theme.
EBC|Fucking Metal|Artist|Androgynous Sexfiend|Gozer Kvltist|
Listen to my music! http://www.soundclick.com/nihilanth
"America is, now, the most powerful and economically prosperous nation in the country." - Master of Ossus
Listen to my music! http://www.soundclick.com/nihilanth
"America is, now, the most powerful and economically prosperous nation in the country." - Master of Ossus
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.1Durandal wrote:You can't copy an image in Firebird? Are you serious? Have you tried downloading it?Hamel wrote:I'm using Firebird and it looks mighty fine
But damn this browser for not letting me copy images
edit: Yeah, your avatar has a grey background in IE, and looks right in Firebird.
"Right now we can tell you a report was filed by the family of a 12 year old boy yesterday afternoon alleging Mr. Michael Jackson of criminal activity. A search warrant has been filed and that search is currently taking place. Mr. Jackson has not been charged with any crime. We cannot specifically address the content of the police report as it is confidential information at the present time, however, we can confirm that Mr. Jackson forced the boy to listen to the Howard Stern show and watch the movie Private Parts over and over again."
- Dalton
- For Those About to Rock We Salute You
- Posts: 22637
- Joined: 2002-07-03 06:16pm
- Location: New York, the Fuck You State
- Contact:
Even with Right Click - Save Image As?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.
Or are you talking about Shift-Click? It's Alt-Click now.
To Absent Friends
"y = mx + bro" - Surlethe
"You try THAT shit again, kid, and I will mod you. I will
mod you so hard, you'll wish I were Dalton." - Lagmonster
May the way of the Hero lead to the Triforce.
Nonono, I mean right clicking on an image and having the option to copy it.Dalton wrote:Even with Right Click - Save Image As?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.
Or are you talking about Shift-Click? It's Alt-Click now.
Alt clicking the image and ctrl+c won't copy it either.
"Right now we can tell you a report was filed by the family of a 12 year old boy yesterday afternoon alleging Mr. Michael Jackson of criminal activity. A search warrant has been filed and that search is currently taking place. Mr. Jackson has not been charged with any crime. We cannot specifically address the content of the police report as it is confidential information at the present time, however, we can confirm that Mr. Jackson forced the boy to listen to the Howard Stern show and watch the movie Private Parts over and over again."
- Dalton
- For Those About to Rock We Salute You
- Posts: 22637
- Joined: 2002-07-03 06:16pm
- Location: New York, the Fuck You State
- Contact:
I'm sorry, are you actually expecting a web browser to copy image information to the clipboard?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.
To Absent Friends
"y = mx + bro" - Surlethe
"You try THAT shit again, kid, and I will mod you. I will
mod you so hard, you'll wish I were Dalton." - Lagmonster
May the way of the Hero lead to the Triforce.
- MKSheppard
- Ruthless Genocidal Warmonger
- Posts: 29842
- Joined: 2002-07-06 06:34pm
Opera allows me to right click and copy the image to the clipboard. YOu
have no idea how useful this feature is.
have no idea how useful this feature is.
"If scientists and inventors who develop disease cures and useful technologies don't get lifetime royalties, I'd like to know what fucking rationale you have for some guy getting lifetime royalties for writing an episode of Full House." - Mike Wong
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
-
- Pathetic Attention Whore
- Posts: 5470
- Joined: 2003-02-17 12:04pm
- Location: Bat Country!
For TOTAL clarification on what I mean:Dalton wrote:I'm sorry, are you actually expecting a web browser to copy image information to the clipboard?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.
"Right now we can tell you a report was filed by the family of a 12 year old boy yesterday afternoon alleging Mr. Michael Jackson of criminal activity. A search warrant has been filed and that search is currently taking place. Mr. Jackson has not been charged with any crime. We cannot specifically address the content of the police report as it is confidential information at the present time, however, we can confirm that Mr. Jackson forced the boy to listen to the Howard Stern show and watch the movie Private Parts over and over again."
I'm not real big on the black-on-dark-gray that results in MF.
Howedar is no longer here. Need to talk to him? Talk to Pick.
-
- Pathetic Attention Whore
- Posts: 5470
- Joined: 2003-02-17 12:04pm
- Location: Bat Country!
- Singular Quartet
- Sith Marauder
- Posts: 3896
- Joined: 2002-07-04 05:33pm
- Location: This is sky. It is made of FUCKING and LIMIT.
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.
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.
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
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.
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
- StarshipTitanic
- Sith Marauder
- Posts: 4475
- Joined: 2002-07-03 09:41pm
- Location: Massachusetts
Except on light blue and a slightly darker light blue.Durandal wrote:I think the white looks a lot better.
"Man's unfailing capacity to believe what he prefers to be true rather than what the evidence shows to be likely and possible has always astounded me...God has not been proven not to exist, therefore he must exist." -- Academician Prokhor Zakharov
"Hal grabs life by the balls and doesn't let you do that [to] hal."
"I hereby declare myself master of the known world."
"Hal grabs life by the balls and doesn't let you do that [to] hal."
"I hereby declare myself master of the known world."
- Singular Quartet
- Sith Marauder
- Posts: 3896
- Joined: 2002-07-04 05:33pm
- Location: This is sky. It is made of FUCKING and LIMIT.
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?
ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer
George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
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.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:
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion