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 strugling to convert Image to bytes and back in my Mobile app. General question is the approach to convert bytes to com.codename1.ui.Image and back Currently I use: custPhotoBytes.length = 26489 Image CustomerPicture = Image.createImage(custPhotoBytes, 0, custPhotoBytes.length); inc.getBytesFromImage(CustomerPicture).length = 26471 byte[] imgBytes = inc.getBytesFromImage(A3CustomerPhotoImageViewer.getImage()); imgBytes .length = 26471 conversion dif of 18 bytes. Why? public byte[] getBytesFromImage(com.codename1.ui.Image image) { EncodedImage img = null; try { img = createFromImage(image, true); } catch (Exception e) { } return img != null ? img.getImageData() : new byte[0]; } Is there a better approach? Thanks in advance. 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 codenameone-discussions+unsubscr...@googlegroups.com. 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/8fa295a3-ec58-42e2-b2a7-3135ff87098e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.