大浪淘沙

北鬥在目 ☆ 太極在胸
正文

Size Pix

(2009-09-19 15:58:52) 下一個
There are probably lots of ways to figure out how big an image is. I'll talk about two:

Method 1 - Your browserThe way I usually do it is with my browser, Netscape Navigator 3.0 (earlier versions won't have this option). First, create a test page with the image on it (or go to a page where you're displaying the image) and load it in Netscape. Go to the View menu at the top of the browser, and click on Document Info. On the screen that appears, you'll see a list of files at the top, including all the images on the web page you're viewing. Click on the image name, and if the image is not animated, you can see at the bottom information about the image, including the size (in pixels and bytes), type, etc. Other browsers such as IE may also have this feature.

Method 2 - A graphics software packageWhen I open up an image in my image viewer (xv on unix), the program displays the size of the image, in pixels, as well as the number of colors it was able to display. I haven't used many downloadable packages for Mac or Windows, but I bet they have a similar feature. Try looking in the online help for "size".

Specifying the size of the image in your HTML fileIn the image statement, add an option which defines the size of the image (in pixels). For example, if the image is 50x75, the HTML code would be:

[ 打印 ]
[ 編輯 ]
[ 刪除 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.