home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Graphic Design and Digital Photography
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2859
Discussions: 186,669, Posts: 2,227,698, Members: 230,316
Free Scan: Update Your PC's Outdated Drivers to Optimize Performance
Old July 13th, 2005, 08:31 AM     #61 (permalink)
Senior Member
 
duckhunter-deux's Avatar
 
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.

duckhunter-deux is offline   Reply With Quote
Old July 13th, 2005, 08:31 AM     #62 (permalink)
ᅟᅠ
 
OuTpaTienT's Avatar
 
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]-->

OuTpaTienT is offline   Reply With Quote
Old July 13th, 2005, 02:09 PM     #63 (permalink)
Member
 
Join Date: Jun 2005
Location: Jupiter, FL
Posts: 106
As if

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?

ry4n is offline   Reply With Quote
Old July 13th, 2005, 02:11 PM     #64 (permalink)
ᅟᅠ
 
OuTpaTienT's Avatar
 
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.
OuTpaTienT is offline   Reply With Quote
Old July 21st, 2005, 08:15 PM     #65 (permalink)
Senior Member
 
CookieBox Inc.'s Avatar
 
Join Date: Aug 2003
Location: ::[Toronto]::
Posts: 665
oh wow, and i thought C++ was hard O_o
CookieBox Inc. is offline   Reply With Quote
Old November 10th, 2005, 10:00 PM     #66 (permalink)
Junior Member
 
Join Date: Nov 2005
Location: Houston, Texas
Posts: 28
Send a message via MSN to FreedomDesign
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.
FreedomDesign is offline   Reply With Quote
Old November 10th, 2005, 10:36 PM     #67 (permalink)
Ultimate Member
 
kenboyles72's Avatar
 
Join Date: Aug 2004
Location: Gladewater, TX
Posts: 1,189
Send a message via MSN to kenboyles72
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.
kenboyles72 is offline   Reply With Quote
Old November 10th, 2005, 10:39 PM     #68 (permalink)
Onii-san
 
Bizkitkid2001's Avatar
 
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.
Bizkitkid2001 is offline   Reply With Quote
Old December 14th, 2005, 05:59 AM     #69 (permalink)
Ultimate Member
 
aznlurkerz's Avatar
 
Join Date: Nov 2001
Location: Seattle, WA
Posts: 1,244
Send a message via AIM to aznlurkerz
awesome post!
__________________
i9300, lovin it!
aznlurkerz is offline   Reply With Quote
Old 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!
hatehotmail is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is this a good laptop for gamming? (5)
Is It Just Me? (630)
Bought an AGP "HIS Radeon HD 3.. (18)
Outlook add-in won't remove. (5)
Presario Help (6)
Misery Loves Company... (1866)
Folderchat: The Holiday thread (156)
No supermajority! (13)
Putting together my wish list (14)
Recent Discussions
Can't print from IE7 (0)
Is this a good laptop for gammi.. (5)
Outlook add-in won't remove. (5)
Seald copy of windows 95 for sa.. (1)
help! jumbled text and computer.. (2)
Need to retrieve files from a v.. (7)
.NET Framework 3.5 Error (0)
Looking for some help (3)
is there a way to Grep for a sp.. (5)
is this a good overal gaming la.. (1)
Magellan RoadMate 1412 GPS Perf.. (2)
FS: Dell 6000 laptop, modded 36.. (2)


All times are GMT -4. The time now is 05:25 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28