How To Change size of Animated GIF Image.




The answer is very simple if you just know a little of HTML. To display a picture on the web, an image tag <img> is used. Thus:

<img src="image URL" />
(just concentrate on img leaving aside src if you are not familiar with HTML)

To change the size, just add the attributes width="some number" and height="some number" (Note: the picture will be distorted {aspect ration changed) unless you keep the ratio constant. The task will be made easier if you just add the width attribute only leaving out the height and the height will be adjusted accordingly.

Update: 

  • Tip: Always specify both the height and width attributes for images. If height and width are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image, and cannot reserve the appropriate space to it. The effect will be that the page layout will change during loading (while the images load).


  • Tip: Downsizing a large image with the height and width attributes forces a user to download the large image (even if it looks small on the page). To avoid this, rescale the image with a program before using it on a page. For example, in the HTML to display the animated gif image replicated below
   gif image uploaded direct from Blogger post editor
The following code is used:
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0a6YIjqUiJZUcaqKGyLfHQtLD-Ru_Mhq9OdG1NDQPadtLPBsC3r43YPe3oMaaYxAHhj674feKzsBfOZo-4ldC9euEm9KPIidqugJ4WSPycd86RaQIG7faBgVdfDGueB3EZYeQk8Bqy6U/s1600-h/starandbird.gif"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0a6YIjqUiJZUcaqKGyLfHQtLD-Ru_Mhq9OdG1NDQPadtLPBsC3r43YPe3oMaaYxAHhj674feKzsBfOZo-4ldC9euEm9KPIidqugJ4WSPycd86RaQIG7faBgVdfDGueB3EZYeQk8Bqy6U/s400/starandbird.gif" border="0" alt="gif image uploaded direct from Blogger post editor"id="BLOGGER_PHOTO_ID_5108675258397126626" /></a>

Now when I add width="350" to the img tag as shown below (note: just concentrate on img and ignore the rest):
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0a6YIjqUiJZUcaqKGyLfHQtLD-Ru_Mhq9OdG1NDQPadtLPBsC3r43YPe3oMaaYxAHhj674feKzsBfOZo-4ldC9euEm9KPIidqugJ4WSPycd86RaQIG7faBgVdfDGueB3EZYeQk8Bqy6U/s1600-h/starandbird.gif"><img width="350" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0a6YIjqUiJZUcaqKGyLfHQtLD-Ru_Mhq9OdG1NDQPadtLPBsC3r43YPe3oMaaYxAHhj674feKzsBfOZo-4ldC9euEm9KPIidqugJ4WSPycd86RaQIG7faBgVdfDGueB3EZYeQk8Bqy6U/s400/starandbird.gif" border="0" alt="gif image uploaded direct from Blogger post editor"id="BLOGGER_PHOTO_ID_5108675258397126626" /></a>

the image is enlarged as in the image below:

                                  gif image uploaded direct from Blogger post editor                                                      
Now to make it smaller, the attribute width="50" is added instead as in
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0a6YIjqUiJZUcaqKGyLfHQtLD-Ru_Mhq9OdG1NDQPadtLPBsC3r43YPe3oMaaYxAHhj674feKzsBfOZo-4ldC9euEm9KPIidqugJ4WSPycd86RaQIG7faBgVdfDGueB3EZYeQk8Bqy6U/s1600-h/starandbird.gif"><img width="50" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0a6YIjqUiJZUcaqKGyLfHQtLD-Ru_Mhq9OdG1NDQPadtLPBsC3r43YPe3oMaaYxAHhj674feKzsBfOZo-4ldC9euEm9KPIidqugJ4WSPycd86RaQIG7faBgVdfDGueB3EZYeQk8Bqy6U/s400/starandbird.gif" border="0" alt="gif image uploaded direct from Blogger post editor"id="BLOGGER_PHOTO_ID_5108675258397126626" width="50"/></a>

and as expected, the animated picture is now smaller:

                                                  gif image uploaded direct from Blogger post editor
0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment