var imageSnapshot:ImageSnapshot = ImageSnapshot.captureImage(map,0,jpgEnc);
imageSnapshot = new ImageSnapshot(800,600,imageSnapshot.data);
var width:int; var height:int; var bytes:ByteArray; var matrix:Matrix = new Matrix(1.275, 0, 0, 0.945) var data:BitmapData = ImageSnapshot.captureBitmapData(map, matrix); var bitmap:Bitmap = new Bitmap(data); width = bitmap.width; height = bitmap.height; bytes = encoder.encode(data); // encoder is the JPEGEncoder you want to use. I think by default the encoding is done in PNG. This bytes can be saved to the backend or you could create another imagesnapshot object to encode the images as base64.
Thank Prashanth, this is work fine. Do not use it because the image obtained is of low quality.Alexander Mena.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.