Can Javascript manipulate images in browsers?

R

Randall Parker

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.
 
V

VK

Randall said:
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.
 
T

Thomas 'PointedEars' Lahn

VK said:
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
 
R

Randy Webb

Thomas 'PointedEars' Lahn said the following on 2/18/2006 8:18 AM:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top