?
Solved

Needed: Cross-Browser javascript that can pixelate or sufficiently blur an image

Posted on 2003-03-22
4
Medium Priority
?
433 Views
Last Modified: 2008-03-17
Pixelation is preferred. What I also need to do is place a watermark over said pixelated image.

Since carrying blurred versions of each image possibilty would get kinda beefy, I'd like to do it on the fly with JavaScript.

The scenario is that I have a bunch of thumbnails which the user can mouseover, which then displays the image in its original size in another area on the page. But not all images should be available to all users, hence the blurring effect. This should work in Mozilla as well as IE.

Thanks!
0
Comment
Question by:byteslinger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Accepted Solution

by:
lil_puffball earned 1000 total points
ID: 8188274
Here's a script. Not sure if it works in Mozilla but certainly works in IE.

<script>
function blurimage(img,str)
{img.filters.blur.strength=str;}
</script>

<img src="image.gif" style="filter:blur(strength=0)" onMouseover="blurimage(this,100)" onMouseout="blurimage(this,0)">

Basically, replace image.gif with your image, and change the number (100 in this case) to whatever you want. The higher the number, the blurrier it is.

PS. Note I used blurimage and img rather than blur and image because those 2 are reserved works, you might want to be careful of that...
0
 
LVL 5

Assisted Solution

by:cirtap
cirtap earned 1000 total points
ID: 8192627
as an addition to lil puffball:
all image effects work in MSIE on Windows *only* using DirectX. Not on Mac, HP, Solaris, nothing.

All you can do with Mozilla is opacity, but it uses a different syntax than MSIE.

Btw: JavaScript is not ment for image processing even if MS provides an interface on windows to do so ;-)

CirTap
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10149508
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: lil_puffball {http:#8188274} & cirtap {http:#8192627}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question