Hi,
is there any downloadable API documentation available? Just because your online help is really slow, outdated, incomplete and annoying.
BR, Torsten
Hi Torsten,
Hi Babar,
thanks for the hint, that the javadoc is delivered as jar. This helped a lot. But the descriptions are still in many cases not very detailed.
This helped me to find a way to convert a raster image to an EMF, which fails when using the method save(outputStream, new EmfOptions()):
ByteArrayOutputStream out = new ByteArrayOutputStream();
PngOptions options = new PngOptions();
options.setPalette(m_image.getPalette());
m_image.save(out, options);
BufferedImage image = ImageIO.read(new ByteArrayInputStream(out.toByteArray()));
Rectangle rcl = new Rectangle(image.getWidth()+1, image.getHeight()+1);
EmfRecorderGraphics2D emfRecorderGraphics = EmfMetafileImage.createEmfRecorderGraphics(rcl, new Dimension(image.getWidth(), image.getHeight()), 200.0f, 200.0f);
emfRecorderGraphics.drawImage(image,0,0,null);
EmfMetafileImage emfMetafileImage = emfRecorderGraphics.endRecording();
emfMetafileImage.save( outputStream ); //important: no format parameter (with parameter it will fail! (save not supported exception))
Maybe implementing this in the built-in save method would be useful.
Another issue occurs when saving (converting) an EMF to GIF. This only works for PNG, but GIF mixes up the color palette. The only workaround I found is the following:
ByteArrayOutputStream pngOut = new ByteArrayOutputStream();
m_metafile.save(pngOut, new PngOptions());
BufferedImage buf = ImageIO.read(new ByteArrayInputStream(pngOut.toByteArray()));
ImageIO.write(buf, “gif”, outputStream);
BR, Torsten
Hi Torsten,
- IMAGING-34266 Conversion of Raster Image Formats to EMF
- IMAGING-34267 Conversion of EMF to Raster Image Formats
The issues you have found earlier (filed as IMAGING-34266) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Torsten,
- Converting EMF to Raster Image Formats
- Converting Raster Images to EMF Format
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.