css - jQuery - How to brighten an image -
hi
in jquery, can use code below, make image darkly. in opposite, how can bright image?
$(this).hover(function() { $(this).stop().animate({ opacity: 0.5 }, 500); }, function() { $(this).stop().animate({ opacity: 1.0 }, 500); });
i'd use pixastic this. has jquery bindings if want take route.
you can lighten or darken image this:
var img = new image(); img.onload = function() { pixastic.process(img, "lighten", {amount:0.5}); } document.body.appendchild(img); img.src = "myimage.jpg";
you fake effect changing opacity of image, making sure background behind image white.
Comments
Post a Comment