Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: Baynative
Resizing images does not reduce the bandwidth required. The entire image is always downloaded and then resized locally on your computer. Here is my general rap on images.

Chow for paragraph eater.

Images:

<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png"><p>
<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="30%">
<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="15%">
<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="7%">
<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="4%">
<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="2%">
<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="1%"> .
Yields:

.

J. R. "Bob" Dobbs receding into infinity...

<img src="http://mumble.com/image.jpg"> substitute the actual source of the image for http://mumble.com/image.jpg This image must be out on a server on the web someplace, not on your machine. This is why people have flickr and picassa accounts. You can easily find out the URL of an existing picture on the web by right-mousing over it and selecting Open Image In New Tab. This will open a tab on your browser containing only that image. The URL of that tab is the one to use as your src="" value.

Some of the photo storage sites on the web (flickr) try to drive web traffic to their site to harvest advertising by providing a convenient pointer to their site that isn't a URL to a .jpg To get the proper URL try right mousing over the image and select Open Image in New Tab. This should get you the naked image itself, without all of the surrounding advertising. This is the URL you want to use.

Access Denied! - No Hotlinking - Occasionally you will see an image that looks good on the site of origin but won't show up if you use it in a posting. Many sites block what they term as "hot-linking" thinking that people who link to their images from pages that are not theirs are stealing their hard paid for bandwidth. They have a point. Either use another image or host it on your own site to fix this problem.

Often the poster will see the image that hot-linking is not allowed for while other users are whining about no image present and red X's. This is because the poster's browser has cached the image and doesn't have to go to the blocked site to get it. A refresh of the page should show what is what.

Size: You can easily vary the size of a given image by specifying it. You may specify size in terms of pixels, em (one character height-width), or percent of enclosing container. Given the wide variation in display platforms the best results are usually obtained by using percent to specify size.

<img src="http://upload.wikimedia.org/wikipedia/en/a/a3/Bobdobbs.png" width="15%"> Yields:

If you are specifying the size of an image it is best to do it in only one dimension and let the computer figure out what the other dimension should be. This will result in images that have not been distorted. Another neat trick is to specify the image size as a percentage of the width of the container the image sits in. This results in a uniform presentation of the image across all possible platforms without having to compute the image size at all.

The native size of the J. R. "Bob" Dobbs picture above is 324x216 pixels. Typical screen pixels per inch numbers for normal displays are in the range of 75 to 150 so the original Dobbs'Head will likely appear on your screen somewhere between 2.88 to 1.44 inches wide.

The next row of Dobbs'Heads are scaled to the width of the enclosing container. We use the width because its value is mostly apparent on the screen. The value of the container's height is less so. The first Dobbs'Head is scaled to 30% of the width of the container. The next at about half that, and so forth... This produces a line of attractive Dobbs'Heads receding into infinity that occupies about half the width of your page, all without needing to know how wide your page is. The size of the images will change if you grab the edge of the page and make it wider or thinner. This is the reason you want to scale images (and anything else, really) by percentages rather than pixels.

In the past it was best to keep your scaling to powers of 2 to minimize scaling artifacts. Current smoothing algorithms and processor speeds make that pretty much unnecessary. Remember that scaling up will not introduce new detail into the existing picture.

Stationary images usually end with .jpg or some variation. Moving images are possible using images which end in .gif The .gif format allows for short sequences of stationary images to be presented like a very tiny movie. Another common format is .png which is a static image format from Microsoft. You will also see images that are .pdf Postscript Document Format. Images in .pdf format will often not post on websites because the .pdf file can easily be a virus container.

You can position an image relative to its surrounding elements by adding the attribute align="middle" to the tag. Recognized attribute values are top, bottom, middle, left and right.

92 posted on 10/29/2016 3:27:48 PM PDT by Mycroft Holmes (The fool is always greater than the proof.)
[ Post Reply | Private Reply | To 91 | View Replies ]


To: Mycroft Holmes

Thanks for the education. You are pretty slick.


93 posted on 10/29/2016 6:09:44 PM PDT by Baynative (Freedom; the dream of every human, the birth right of every American.)
[ Post Reply | Private Reply | To 92 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson