Free Scan: Update Your PC's Outdated Drivers to Optimize Performance
July 13th, 2005, 08:31 AM
|
#61 (permalink)
| | Senior Member
Join Date: Aug 2004 Location: A hole in the wall.
Posts: 869
|
DanU is right about the JPEG size/accuracy ratio compared to some PNG images for online display. I use PNG for all my images, and normally use that format when I upload an image to DeviantArt. However, sometimes the PNG will be 3MB, while the JPEG only 320KB. In order to get the PNG down to JPEG size, I have to either lower the resolution or actual image size (neither of which I like doing). For the sake of those using dial-up, I'll upload the JPEG, while keeping the PNG for myself. Sometimes it's the other way around though, where the PNG is smaller. It really just depends on the image and what is involved in the image.
__________________
Wake up you're dead.
|
| |
July 13th, 2005, 08:31 AM
|
#62 (permalink)
| | ᅟᅠ
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,446
|
Here's the code that needs to go in the <head> portion of the page code to force IE to display pngs correctly: Code: <!--[if gte IE 5.5000]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]--> |
| |
July 13th, 2005, 02:09 PM
|
#63 (permalink)
| | Member
Join Date: Jun 2005 Location: Jupiter, FL
Posts: 106
|
Us Web guys have enough code to worry about, why haven't Microsoft fixed this yet? Is there some kind of grudge towards the company who coded the PNG? |
| |
July 13th, 2005, 02:11 PM
|
#64 (permalink)
| | ᅟᅠ
Join Date: Oct 2001 Location: ɐqɟs
Posts: 10,446
|
Well you don't always have to include all that code. You can just place it in a file then call the file from the html document. |
| |
July 21st, 2005, 08:15 PM
|
#65 (permalink)
| | Senior Member
Join Date: Aug 2003 Location: ::[Toronto]::
Posts: 665
|
oh wow, and i thought C++ was hard O_o |
| |
November 10th, 2005, 10:00 PM
|
#66 (permalink)
| | Junior Member
Join Date: Nov 2005 Location: Houston, Texas
Posts: 28
|
Considering the fact that most of the lemming public dosent even have their monitors set up for correct color or resolution, and do not have a real eye for correct color or res. I dont see any point in using png files on the web and going thru the hassle of MORE freakin javascript. Jpegs are more than fine for Harry and the Hendersons.
I do agree that png is far and away better for image archiving. I personally tend to use TIFF with LZW compression, but this is mostly a habit formed from years of working with different rips commonly used by printing company's graphic departments. Most rips in the past couldnt rip a PNG to save a life, and had trouble with jpegs as well. I have heard that they are comming around though. |
| |
November 10th, 2005, 10:36 PM
|
#67 (permalink)
| | Ultimate Member
Join Date: Aug 2004 Location: Gladewater, TX
Posts: 1,189
|
i've have known about the distortion of pics being converted to jpg for some time now. most of my pics that i have saved is in bmp or png format. i agree with you completely about having png formats recognized by IE. the png format is the best overall, IMO, small file size with good quality. png isnt new, its been around for a while. dont see why some of these idiots haven't come to realize the superior qualities of png against jpg files. maybe only becuase most apps utilize the jpg fomat more. so what? come on people, get with the program, jeeez. |
| |
November 10th, 2005, 10:39 PM
|
#68 (permalink)
| | Onii-san
Join Date: Sep 2002 Location: San Antonio
Posts: 8,653
|
Hey OuT, since this thread was bumped up, I was wondering if you ever got around to updating this article?
I remember PMing you somthing that had to do with this article but it was so long ago that I forgot what I told you.
__________________
One by one the penguins steal my sanity.
|
| |
December 14th, 2005, 05:59 AM
|
#69 (permalink)
| | Ultimate Member
Join Date: Nov 2001 Location: Seattle, WA
Posts: 1,244
|
__________________
i9300, lovin it!
|
| |
December 14th, 2005, 08:49 AM
|
#70 (permalink)
| | Member
Join Date: Oct 2005
Posts: 84
|
PNG it is Quote: |
Originally Posted by CookieBox Inc. oh wow, and i thought C++ was hard O_o | haha 
__________________
Of course it can be fixed!
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |