Hi,
I have been using Aspose for sometime now. I seem to have
problem in the resolutions of the generated images. I am using this method :
BufferedImage imge = slide.getThumbnail(new Dimension(842, 595));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(baos);
encoder.encode(imge);
byte[] imgData = baos.toByteArray();
Jpeg jpegImage = new Jpeg(imgData);
document.add((Element) jpegImage);
What I seem to notice is that the text and the images are not exactly the quality they appear in the ppt(when the zoom-out is done). This, I presume is because of the Raster-Rendering instead of vector rendering. Am I doing anything wrong ? Is there a method to get thumbnails of different sizes wthout compromising on Quality ? Do you think this issue could be a result of aspect ratio going wrong ? (My Slides can be of any dimension, but I create thumbnails only of 842 X 595 dimension)
Please note that I am only talking about the Quality here. Things are fine in other aspects.
I am using
aspose-metafiles-1.4.1-20090326.jar
aspose-slides-1.9.1.jar
I also have the License
– Vaidyanathan.S
Kuliza Technologies
Can someone help me out ?
Need your expert help !
Experts !!! Where are you ? …
Hello,
Aspose.Slides uses vector rendering with AffineTransform applied so there shouldn’t be a problem with fonts. Sometimes there can be issues with metafiles rendering especially if they are cropped or resized on a slide. For better problem investigation, could you please provide example of the presentation you try to render.
One more suggestion. It’s not a good solution to use exact dimension for the image size. If you have different slides they can be stretched in this case. The best way is use getThumbnail with vertical and horizontal scale factor. For the standard image resolution the code will look like this:
slide.getThumbnail(1.0f, 1.0f);