Can Javascript manipulate images in browsers?

Discussion in 'Javascript' started by Randall Parker, Feb 18, 2006.

  1. Can Javascript in a browser do any of the following:

    1) Draw icons on currently visible images.

    2) Allow only a subset window into the image to be visible.
     
    Randall Parker, Feb 18, 2006
    #1
    1. Advertising

  2. Randall Parker

    VK Guest

    Randall Parker wrote:
    > Can Javascript in a browser do any of the following:
    >
    > 1) Draw icons on currently visible images.
    >
    > 2) Allow only a subset window into the image to be visible.


    If in both cases you mean the visual appearance on the page, then yes -
    you can position one picture atop of other and use style.clip property
    to make only part of it displayed. You actually do not need any script
    for that, styling is anough unless you want to change the appearance
    dynamically.

    If you mean digitally patch the image data itself then it is not
    possible by JavaScript.
     
    VK, Feb 18, 2006
    #2
    1. Advertising

  3. VK wrote:

    > If you mean digitally patch the image data itself then it is not
    > possible by JavaScript.


    Not true. It is not possible without an extension of the Application
    Object Model of the user agent (UA), say a plugin, or a Firefox
    extension. Whether the language accessing that AOM would be JavaScript
    (NN, Gecko-based) or JScript (IE-based) would not matter, but would be
    defined by the UA which AOM is extended this way.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Feb 18, 2006
    #3
  4. Randall Parker

    Randy Webb Guest

    Thomas 'PointedEars' Lahn said the following on 2/18/2006 8:18 AM:
    > VK wrote:
    >
    >> If you mean digitally patch the image data itself then it is not
    >> possible by JavaScript.

    >
    > Not true.


    It is very true.

    > It is not possible without an extension of the Application
    > Object Model of the user agent (UA), say a plugin, or a Firefox
    > extension.


    That isn't the language implementation changing the image, it is the
    plugin/extension changing it.

    > Whether the language accessing that AOM would be JavaScript
    > (NN, Gecko-based) or JScript (IE-based) would not matter, but would be
    > defined by the UA which AOM is extended this way.


    And it would not be JScript nor Javascript nor ECMAScript that was
    modifying the image. It would be the AOM extension so the answer to the
    question is no, script can't modify an image.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Feb 19, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SamIAm
    Replies:
    2
    Views:
    352
    SamIAm
    Nov 3, 2003
  2. gino
    Replies:
    3
    Views:
    613
    Thomas Weidenfeller
    Jul 14, 2004
  3. Dave
    Replies:
    1
    Views:
    346
    Mike Wahler
    Jan 22, 2005
  4. El Kabong

    Browsers, browsers! Quo vadis?

    El Kabong, May 11, 2007, in forum: HTML
    Replies:
    23
    Views:
    944
    dorayme
    May 13, 2007
  5. Replies:
    1
    Views:
    79
Loading...

Share This Page