Please help with SheetRender / ImageOrPrintOptions exporting issues.
I need to be able to export a WorkSheet to an image that will be watermarked via an overlay of another image.
Option 1:ImageOrPrintOptions.ImageFormat = ImageFormat.Emf;
Quick and clear export to EMF, with low memory usage, but converting the EMF
to Bitmap to overlay the watermark image results in a blurred image. Not good enough to print.
Option 2: ImageOrPrintOptions.ImageFormat = ImageFormat.Png;
To get a decent image quality I need to set the [Horizontal/Vertical]Resolution = 250;
This makes the export slower, and uses a LOT of memory.
My application jumps to 1.2GB of memory usage when exporting a workbook with about 30 images.
Please run this through the attached sample application, and compare the memory usage between the 2 output formats. (You'll just need to add a folder called Images)
I cannot use a "using" clause around the SheetRender because it doesn't implement IDisposable.
There seems to be a memory leak.
So, is there a way to export an image (JPG, PNG, BMP) with the quality of EMF?