How can I create a java.awt.image.BufferedImage or a java.awt.Image from a com.aspose.imaging.Image?
Please move to enterprise support: we would like an answer ASAP.
Hi there,
Thanks for your inquiry. I am afraid currently Aspose.Imaging for Java doesn’t support java.awt.image.BufferedImage
and java.awt.Image
. We have already logged a feature request for the purpose. We will notify you as soon as it is implemented. However as a workaround you can use byte array to convert to and from BufferedImage. Hopefully it will help you to accomplish your requirements.
BufferedImage originalImage = ImageIO.read(new File(myDir +“input.png”));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(originalImage, "png", baos);
baos.flush();
byte[] imageInByte = baos.toByteArray();
baos.close();
InputStream isImage = new ByteArrayInputStream(imageInByte);
Image image = Image.load(isImage);
image.save(myDir + "output.gif", new com.aspose.imaging.imageoptions.GifOptions());
Please feel free to contact us for any further assistance.
Best Regards,
nuix:
Please move to enterprise support: we would like an answer ASAP.
The issues you have found earlier (filed as IMAGING-33618) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.