Free Support Forum - aspose.com

Overloaded GetThumbnail request

I know this may sound like an odd request, but hear me out. I was wondering if you could add another version of GetThumbnail that takes the actual width and height as integers instead of the scale as doubles?

The reason is because I'm not getting exact size conversions when I use

GetThumbnail(scaleX as Double, scaleY as Double)

Here is what I'm doing.

slideImage = slide.GetThumbnail(newWidth / originalWidth, newHeight / originalHeight)

So when I want to get slides that are 440 x 330, I pass in newWidth = 440 and newHeight = 330. The division gives me the scale versus the original size. What I get back, in this case, however are slides that are 439 x 329. I know that it's only 1 pixel, but it is possible in my work that 1 pixel could make a difference.

Other examples are 520 x 390 comes out at 519 x 389.

400 x 300 and 640 x 480 seem to come out just fine.

So I would like to be able to call GetThumbnail(desiredWidth as Integer, desiredHeight as Integer) and get my slides back the exact size that I pass in.

What do you think?