Canvas.savedoes not work on Android
-
I created a canvas using QML, made some drawings, and thenused its"save" function to save the content to an image file. Itworks onPC, but when run on android phone, it gived an warningmessage""Pixel readback is not supported in Cooperative mode,please tryThreaded or Immediate mode", and the "save" functionreturned"false" (i.e. failed). Therefore I set the Canvas's"renderStrategy" property to Canvas.Immediateor Canvas.Threaded, now the"Save"function works, but in both cases, the program soon gived anerrormessage "Fatalsignal 11 (SIGSEGV)at 0x509f93b0 (code=2)" and crashedimmediately.
I then triedthe followingcodes:
"var ctx =canvas.getContext('2d')
var imgData = ctx.getImageData(0, 0, canvas.width, canvas.height)"
to get the image data, but got the same warning/error message and crash problem.This is a very serious issue for Qt as it significantly reduces its application value on android.
Thanks! Icreated a canvas using QML, made some drawings, and thenused its"save" function to save the content to an image file. Itworks onPC, but when run on android phone, it gived an warningmessage""Pixel readback is not supported in Cooperative mode,please tryThreaded or Immediate mode", and the "save" functionreturned"false" (i.e. failed). Therefore I set the Canvas's"renderStrategy" property to Canvas.Immediateor Canvas.Threaded, now the"Save"function works, but in both cases, the program soon gived anerrormessage "Fatalsignal 11 (SIGSEGV)at 0x509f93b0 (code=2)" and crashedimmediately.
I then triedthe followingcodes:
"var ctx =canvas.getContext('2d')
var imgData = ctx.getImageData(0, 0, canvas.width, canvas.height)"
to get the image data, but got the same warning/error message and crash problem.This is a very serious issue for Qt as it significantly reduces its application value on android.
Thanks! I am looking forward to your help!