jquery - How to make image fit in the edge? html5 canvas javascript -


http://i.stack.imgur.com/4oayt.png

this original when not insert image. has blank image

http://i.stack.imgur.com/aupwr.png

i want know how make image curve fit edge (in red circle image fit in edge).

what framework can this?

  • raphaeljs
  • fabricjs
  • kineticjs

thank me. sorry bad english. best regard.

around square corner

you can use shearing transforms give illusion rectangular image being shaped around corners. shearing transforms how put rectangular logo image on rectangular “3d” box. “shearing” effects can use of libraries mention…or use canvas itself. , shearing effects give sharp creased edge transforms rather curved transforms. here’s example: http://www.createjs.com/#!/easeljs/demos/transform

around curved corner

but curved transforms, need webgl or image processing library perspective transforms.

check out server based imagemagick tool , in particular @ 3d boxes, perspective layering section on page: http://www.imagemagick.org/usage/distorts/#methods

enter image description here

quoting imagemagick.org page:

this image created taking [rectangular] image of anime video box cover, splitting cover 3 segments ('cover', 'spine', , 'back'), distorting each separately, layered images. image finished addition of highlights , shading effects (using hardlight image composition), , addition of border , semi-transparent shadow effects (using copyopacity).

you can in photoshop--probably easier ;)

  • bring logo image , phone case photoshop on separate layers.
  • use “free transform” rotate image same angle phone case.
  • use “warp” in “custom” mode wrap image around phone case (the grid helps guide you).
  • there’s not lighting in phone case, use “blending” in overlay mode have transformed image take on highlights of phone case.

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -