JavaScript
  Home arrow JavaScript arrow Zooming in on Images with JavaScript
IBM Developerworks
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Zooming in on Images with JavaScript
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 2
    2008-03-04

    Table of Contents:
  • Zooming in on Images with JavaScript
  • Developing a basic front-end
  • Defining a couple of handy JavaScript functions
  • Attaching the JavaScript functions to the zooming controls

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Zooming in on Images with JavaScript
    (Page 1 of 4 )

    Assuming that zooming-in bitmapped images with JavaScript may be interesting and useful to you, in this series of tutorials, I’ll develop a highly-expansible client side application, which will be tasked with enlarging (and decreasing when applicable) the dimensions of a specific image.

    As you may have noticed, more and more modern web sites are incorporating different client and server-side mechanisms aimed at providing visitors with a highly-customized surfing experience. This fact is particularly evident with web sites that deliver their respective contents in diverse formats (the prestigious Developer Shed network is a good example), such as (X)HTML, printer-friendly versions, PDF, etc.

    This level of customization is achieved by using a server-side scripting language, which certainly can be useful for delivering database contents in a variety of formats. There are many other approaches that can be implemented via client-side programming to allow users of a given web site to personalize some of its elements.

    With reference to the previous concept, it’s common nowadays to see certain web sites that include small controls for decreasing and enlarging the size of their text-based contents, or even panels that allow you to change the complete appearance of different sections of the web site via the direct manipulation of its style sheets.

    Of course, as you might guess, the concept surrounding the implementation of diverse mechanisms focused on customizing the surfing experience of users can also be extended to other elements of a web site, such as bitmapped images. In truth, it’s relatively easy to develop a JavaScript application that lets users modify certain aspects of different images on a web page, such as enlarging proportionally their respective width and height values.

    Logically, the purpose of doing this is to provide visually impaired visitors with a simple mechanism that allows them to enlarge determined bitmapped images that belong to a particular web site. In addition, the mentioned mechanism can be developed, but all of the JavaScript applications that run on that web site should have a graceful degradation, if scripting has been disabled on the browser, which implies that users will still be able to view the images.

    Speaking more specifically, I’m going to start this educational journey by building an introductory zooming script, but in the upcoming parts of the series, I’ll add more complex features to it. So, are you ready to learn how to zoom images in and out with JavaScript? Great, let’s get started now!

    More JavaScript Articles
    More By Alejandro Gervasio


       · Zooming in on bitmapped images with JavaScript is actually a simple process that can...
     

    JAVASCRIPT ARTICLES

    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps
    - Adding Zoom Controls to Yahoo! Maps
    - Working with Yahoo! Maps
    - Building Image Zooming Controls with the DOM...
    - Working with Multiple Graphics for a Zoom Ap...
    - Improving an Image Zooming Application with ...
    - Zooming in on Images with JavaScript
    - JavaScript Date Objects: Universal Coordinat...
    - Javascript Objects: More Date Methods
    - JavaScript Objects: Dates
    - JavaScript Objects: Finishing Strings

    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway