Answer the question
In order to leave comments, you need to log in
How to cut an image using JS?
I have an AngularJS application. Do I need to cut the picture into 9 or 16 equal parts and put them in an array? Plus, you need the ability to rotate the resulting pieces. Preferably without jQuery. How can I do that?
I have coordinates for drawing a piece of the picture
_stage.drawImage(_img, piece.sx, piece.sy, _pieceWidth, _pieceHeight, xPos, yPos, _pieceWidth, _pieceHeight);
Answer the question
In order to leave comments, you need to log in
www.html5canvastutorials.com/tutorials/html5-canva... - here is an example
and the image can then be put into a blob
Maybe you can somehow decode to base64 and cut it .. I think you can’t do without canvas. There is a discussion here stackoverflow.com/questions/6150289/how-to-convert...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question