image Dimensions

To change the image size means HTML provided width and height of the tag <IMG>.
Sample.gif original image is sized 100 by 111 pixels.

HTML code for location of the picture:

<img src = "sample.gif" width = " 100" height = "111" alt = "Initial Size">

Be sure to ask the size of all the images on a web page. This is slightly faster page load, as the browser is no need to calculate the size of each image after it is received. This is especially important for images placed within the table. This table is shown as long as all the drawings it will not fully loaded.

Width and height of the image can be changed in less, and a big party. However, drawing the download speed is not affected, because the file size is unchanged. Therefore, caution and reduce, as This can cause confusion among readers, which made such a small pattern so long to boot. But the increase in size has the opposite effect - the image size is large, but the file size relatively similar images load faster.

Below is a diagram sample.gif with a width and height (200 x 222) increased twice.

And accordingly HTML code to it:

<img src = "sample.gif" width = " 200" height = "222" alt = "Actual size">

The algorithm used by the browser for the resampling (resizing) of the image, gives according to his ability graphical editors. Therefore, to increase the image by changing their size should be in special cases, too deteriorates image quality. It is better to use any graphics program. The exceptions are patterns containing rectangular area. The following pattern file occupies 54 bytes, and is the initial size of 8 by 8 pixels, increased to 150.


In the figure there are no distortions, not surprisingly, from which they all come from, if all the lines just vertical and horizontal.

© Policy Copyright www.htmlbook.ru