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 10 Pro
Simulator Latest
Device PC, Android & IOS

I am creating an Image from bytes: 
Image CustomerPicture = Image.createImage(vehiclepicture, 0, 
vehiclepicture.length);
A3VehiclePhotoImageViewer = new ImageViewer(CustomerPicture)
Source bytes are 303981, getBytesFromImage returns 303980


    public byte[] getBytesFromImage(com.codename1.ui.Image image) {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        byte[] BytesFromImage = new byte[0];
        try {
            if (image != null) {
                ImageIO.getImageIO().save(image, outputStream, 
ImageIO.FORMAT_PNG, 1f);
                BytesFromImage = outputStream.toByteArray();
            }
        } catch (Exception e) {
            e.printStackTrace();
            MyLog.e(e);
        }
        return BytesFromImage;
    }

Thoughts?

Regards

-- 
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/e25a752f-516c-4372-9f88-1e9b59535d73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to