I want to do the same as this Android code in CN1: Bitmap mBitmap = Bitmap.createBitmap(mContent.getWidth(), mContent.getHeight(), Bitmap.Config.RGB_565); Canvas canvas = new Canvas(mBitmap); v.draw(canvas); // draw current view to bitmap ByteArrayOutputStream stream = new ByteArrayOutputStream(); mBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); // now have PNG of the component
Shai answered a similar question with: "You can create a mutable image (Image.create(width,height)) then invoke getGraphics on it and paint the component onto it.", which seems reasonable, but I'm not sure what to do to make that happen. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/347db8bc-3371-432c-8a6b-ef413b4732f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
