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
Ask a Tech Support Question (free)!

A case against JPG

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2637
Discussions: 200,999, Posts: 2,380,010, Members: 246,369
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)
nuisance since 1968
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: ɐqɟs
Posts: 10,457
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)
nuisance since 1968
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: ɐqɟs
Posts: 10,457
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: 9,536
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 online now   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
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3111)
‘Rogue’ or ‘Rouge’? (9)
Charges against non-tippers dropped.. (22)
Foxconn Blackops x48 MoBo (5)
Nvidia GTX 260 problem (14)
Delete an OS (18)
Laptop with wireless problem. (13)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
[F@H SPAM 11/16/09] ! 1/2 months to.. (42)
Point and Shoot Camera Suggestions. (9)
windows vista security holes (19)
windows 7 problem (7)
Recent Discussions
[F@H SPAM 11/16/09] ! 1/2 months to r.. (42)
add ram to existing (4)
Computer shutting down on its own (6)
EVGA 9800 gtx help with finding a goo.. (13)
"Documents and Settings" fo.. (7)
Delete an OS (18)
Outputing 1080p from my PC to my 720p.. (0)
panasonic dmr ez48veb recorder (0)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Laptop with wireless problem. (13)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)
Foxconn Blackops x48 MoBo (5)
Print spooler problem (17)
Q9650 vs. Q9550 (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Size after cutting 700Mb file is 2.5 .. (0)
windows vista security holes (19)


All times are GMT -4. The time now is 02:45 PM.
TechIMO Copyright 2009 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