Sridhar Sarnobat
Sridhar Sarnobat

Reputation: 25286

Can CSS morph images by pixel mapping?

I'd like to be able to animate the transition between these 2 images, which don't have perfect pixel-to-pixel mapping (so I'd like to specify the key pixels myself):

1996 to 2016

Can something like this be accomplished with CSS (or, failing that, javascript)? I know CSS3 can transition basic shapes (e.g. https://www.w3.org/Talks/2012/0416-CSS-WWW2012/Demos/transitions/demo-transitions-1.html) but I'd like to do the same with a pair of images that are similar but different (e.g. in age of the face or building).

Upvotes: 1

Views: 789

Answers (1)

adam rowe
adam rowe

Reputation: 446

CSS can only do the cool transformational stuff because it's working on markup, even if it's SVG. It can't grab individual pixel data.

(I think it's a great question and I'd love to cite something, but I would have to cite something about what CSS can't do... which is what this post will be after long enough....)

Upvotes: 1

Related Questions