If you are experiencing an issue please mention the full platform your 
issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows
Simulator latest
Device PC

In Java, I can retrieve byte [] from Image with this code. However ImageIo 
class in codename1 does not support a write method.
    public byte[] getBytesFromImage(java.awt.Image image) {
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        try {
            ImageIO.write((RenderedImage) image, "jpeg", stream);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return stream.toByteArray();
    }

Can you please advise an alternate codename1 method to convert a 
com.codename1.ui.Image in memory to a byte array?

-- 
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/3575be77-451d-4d25-9bfb-2fd00f48b965%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to