Z
Z
ZaurK2018-03-09 08:56:07
PHP
ZaurK, 2018-03-09 08:56:07

How to get the contents of the canvas tag?

Hello! There is a canvas tag, in which the picture, and you can change it with the mouse - drag the picture element over the canvas. Is it possible somehow to get this image and write it to a variable?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2018-03-09
@healqq

saving from canvas to vector will not work, canvas is a raster image. To get a bitmap(png/webp) you can use the toDataURL method

D
Dmitry Tereshchuk, 2018-03-09
@DeepCool

regular season

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question