On Thursday, June 27, 2019 at 5:03:51 PM UTC-4, [email protected] wrote: > > 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/1a1e0adb-a1ae-4a80-b768-866f16c1e573%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
