1 Reply Latest reply on Jan 12, 2010 1:16 PM by Jason Szeto

    TextArea text not displayed correctly with ImageSnapshot

    ScottFriebel Level 1

      I am having an issue with the ImageSnapshot.captureImage command capturing the text in a TextArea. Attached are two files illustrating the issue. The "screenshot.jpg" pic shows how the TextArea controls are displayed on the screen. The "created jpg.jpg" pic shows how the text is displayed in the jpg that is created. Below is the code that creates the snapshot, everything is pretty standard there as far as I can tell. The text is obviously not sized the same from one to the other. Any ideas whats going on here or what I can do to correct it?

       

      var myencoder:JPEGEncoder = new JPEGEncoder(50);

      var imgss:ImageSnapshot = ImageSnapshot.captureImage(viewstack.selectedChild, 100, myencoder);

       

       

       

      var fs:FileStream = new FileStream();

      var ssfile:File = File.applicationStorageDirectory.resolvePath("ProjectImages/snapshot.jpg");

      fs.open(ssfile, FileMode.WRITE);

      fs.writeBytes(imgss.data, 0, imgss.data.length);

      fs.close();

       

      Thanks,

      Scott