I have a question. I am trying to export a GoView object into a Bitmap. I then use this bitmap for saving/printing purposes. However. just the exporting part does not get done at a satisfactory level.
I used:
MyObject : GoView, IGoControlObject
var bmp = myObjectInstance.GetBitmapFromCollection( myDocument, myDocument.Bounds, true );
bmp.Save(fileName, imageFormat);
This code produces a bitmap but the bitmap is very bad quality. The text within my GoObjects is not at all readable. I tried playing with the .SetRosolution(dpi) method. I didn't change anything at all.
Are you saying that if I export a bitmap image over the size of 32K by 32K pixels, it will “overflow” ??? Meaning if image is x by y, then x times y should not be over 1024 MEGA pixels???
yes. It’s a GDI+ / architectural 32-bit limit.
2) I get no exceptions when I generate my bitmaps, no matter how big they are… I just get them bad quality…
3) What are those limits? And why are there limits?
4) Any workarounds?
The GetBitmapFromCollection with 3 parameters (the one you use above) limits the size of the Bitmap to 2000x2000 pixels. so, it is applying scaling for you.
use GetBitmapFromCollection(IGoCollection coll, RectangleF bounds, float scale, bool paper)
The scale overload is a workaround for exporting big bitmaps, but it still doesn’t fix the loss of quality we experience (text is not readable at all and shapes don’t look sharp).
Vector images (example Metafile object in .NET) seem to be much better quality than Bitmap object. Can we get vector images or Metafile objects exported from GoView? That should solve our problem.