This seems like it's important information if you ever do web graphics. I've been at it for a dozen years, and it caught me completely unaware. An article at Sitepoint yesterday claimed that Fireworks was the only graphics application to take advantage of a little known capability specified for PNG-8. Fireworks can save a PNG-8 with more than one level of transparency and will be displayed in Internet Explorer version 6.
The article goes on to say none of the web folks in his office would believe it at first and of course, I didn't either. It took me a while to get IE6 on a laptop and do a few test files, but damn. It's true.
First I created a simple image in Photoshop that displayed a fuzzy glow. I saved this first version as a "PNG24" with 8-bit transparency right out of Photoshop. Next, I matted the fuzzy semi-transparent glow to a test pages blue background color and saved a PNG-8 out of Photoshop. I closed the layered Photoshop file, then opened it in Fireworks. Fireworks has always been a bit tedious to me- I'm not a Macromedia fan, and always preferred Adobe's ImageReady. Doing anythng at all in Fireworks is very unfamiliar territory, but it was easy to just turn off the background layer and choose "Alpha Transparency" instead of "Index Transparency" then save the new version.
I was shocked. It made a big difference. Almost a dozen years working with this stuff and I'm just learning something this elementary NOW? Damn. Keep in mind that a textured background makes the transparency in the image more noticeable. I've placed a test page on the personal server with examples of PNG-24 and PNG-8 from Photoshop, PNG-8 from Fireworks, and most importantly, a screen capture of the display as it appears in Internet Explorer version 6. Version 6 and earlier had no support for PNG-24 8-bit transparency, and displayed it as a default gray field.
Added Saturday, 09/22:
More, I made this capture that shows the same 8-bit PNG with alpha transparency opened in Photoshop on the left, and in Safari on the right.
...and I trusted you, Photoshop. Now, it can never be the same again.
Monday, 12 September 2011
Wednesday, 14 October 2009
oledbdatareaderclass
http://authors.aspalliance.com/aspxtreme/sys/Data/oledb/oledbdatareaderclass.aspx
Tuesday, 13 October 2009
Monday, 12 October 2009
How To: Reading and Writing Text Files
Writing to a Text File
Listing 1: Writing Text Data to a File: TextFileWriter.cs
Reading From a Text File
Listing 2 shows how to read from a text file:
Listing 2: Reading Text Data from a File: TextFileReader.cs
Listing 1: Writing Text Data to a File: TextFileWriter.cs
using System;
using System.IO;
namespace csharp_station.howto
{
class TextFileWriter
{
static void Main(string[] args)
{
// create a writer and open the file
TextWriter tw = new StreamWriter("date.txt");
// write a line of text to the file
tw.WriteLine(DateTime.Now);
// close the stream
tw.Close();
}
}
}
Reading From a Text File
Listing 2 shows how to read from a text file:
Listing 2: Reading Text Data from a File: TextFileReader.cs
using System;
using System.IO;
namespace csharp_station.howto
{
class TextFileReader
{
static void Main(string[] args)
{
// create reader & open file
Textreader tr = new StreamReader("date.txt");
// read a line of text
Console.WriteLine(tr.ReadLine());
// close the stream
tr.Close();
}
}
}
URL Rewriting in >NET
<urlMappings configSource="Mapping.xml" />
Mapping.xml
<?xml version="1.0" encoding="utf-8" ?>
<urlMappings>
<add url="~/Page1.aspx" mappedUrl="~/Default.aspx?ID=1" />
<add url="~/Page2.aspx" mappedUrl="~/Default.aspx?ID=2" />
</urlMappings>
Mapping.xml
<?xml version="1.0" encoding="utf-8" ?>
<urlMappings>
<add url="~/Page1.aspx" mappedUrl="~/Default.aspx?ID=1" />
<add url="~/Page2.aspx" mappedUrl="~/Default.aspx?ID=2" />
</urlMappings>
Subscribe to:
Posts (Atom)