Error #2030: End of file was encountered.
This method does not work.
I use it like this
var ba:ByteArray = new ByteArray(); ba = bmd.getPixels(bmd.rect); bmd.setPixels(srcRect, ba); bm.bitmapData = bmd; img.source = bm;
You need to reset to assign your byte array (ba.position = 0) before reusing
var ba:ByteArray = new ByteArray(); ba = bmd.getPixels(bmd.rect); ba.position = 0; bmd.setPixels(srcRect, ba); bm.bitmapData = bmd; img.source = bm;
Source: https://habr.com/ru/post/1789676/More articles:How do you access the Google service using the java client? - javaIPad Safari Javascript Hanging Incrementer - javascriptIs there a VSDoc file for jQuery 1.5? - jqueryЯвляется ли Geb (платформа тестирования автоматизации) хорошей платформой для приемочного тестирования? - testingрегулярное выражение python - pythonnode link migration - drupalIIS 6 and 7 - Change the default message that appears when the application pool is stopped - .netRequest through multiple domain objects in Grails - grailsRecording images by URLConnection - javafile is damaged when I send it to servlet using GZIPOutputStream - javaAll Articles