开发者

Need to know standards for png file in web graphics?

开发者 https://www.devze.com 2023-01-26 03:10 出处:网络
I\'m starting to venture out from using jpeg and gif files to png, I was wondering if there were any standards for using png beside IE\'s 开发者_高级运维lack of support for it.I also want to know if t

I'm starting to venture out from using jpeg and gif files to png, I was wondering if there were any standards for using png beside IE's 开发者_高级运维lack of support for it. I also want to know if there was any current articles about setting I should be using when optimizing for web? Right now I'm using photoshop to do this, should I be using firework instead?


Which optimizations you use depends on the type of image. If your image contains only few colors, you might use png-8, otherwise you may need png-24. Same goes for the use of transparency/alpha blending. The Photoshop save for web-feature does a fine job, but when your website has a lot of visitors, you may benefit from using PNGCrush for further compressing your images. You can use the YSlow plugin for FireFox to test how much bandwidth you can save by crushing your images.

Also, you can make use of CSS-sprites if your design allows it. This can result in less (but larger) images and therefore less requests and sometimes less bandwidth. But this doen't depend on the type of images you use.

Png is supported by IE, by the way. Only the alpha-transparency is not supported by IE 6, but there are CSS/Javascript trics to work around that, although they do not work for background images.

I wouldn't quit using jpg. Jpg is very useful when it comes to pictures. Png files are convenient for small images like buttons, graphical elements, and for images with large plain areas, like screenshots.

0

精彩评论

暂无评论...
验证码 换一张
取 消