Slide Thumbnail Generation is not matched with Code width and Height

we are using the below code to generate the thumbnail for pptx file.


ISlide oSlide = pres.Slides[0];

//Getting the thumbnail image of the slide of a specified size

image = oSlide.GetThumbnail(0.5480F, 0.470F);


For the PPTX file with Height - 36 inches Width - 24 inches (normal slides) then it's generating 395 x 254 size pictures and no issues with this.


But when we use the PPTX file with Height - 36 inches Width - 24 inches then it's generating 947 x 1218 size pictures.


But my code has the width and height, but it's not generating based on my code.

image = oSlide.GetThumbnail(0.5480F, 0.470F);


why this size is vary? what ever the slide size it should generate the thumbnail of given size right?.

Hi Arul,

I have observed the presentation file shared by you and have observed the generated thumbnail as well. Aspose.Slides has performed as expected and there is no issue in generated thumbnail size. Let me share the reasoning with you. In Aspose.Slides we have 72 pixels per inch. So, for your presentation slide size of 24 inch x 36 inch, the total size in pixels is 24 * 72 pixels x 36 * 72 pixels = 1728 pixels x 2592 pixels. Now, when you say to generate the thumbnail with scaling factor 0.5480F, 0.470F, this means 1728 * 0.5480F x 2592 * 0.470F = 946.944 x 1218.24 approx 947 x 1218. This is the size you are getting in your output image and there is no issue in this. I hope this will elaborate the concept to you.

Now, in order to generate the slide thumbnail with user defined dimensions instead of using scaling factor, I suggest you to please visit this documentation link for your kind reference in this regard.

I hope the shared information will be helpful. Please share, if I may help you further in this regard.

Many Thanks,