THUMBSIZE does not affect preview image size on acdbGetPreviewBitmapFromDwg()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning,
Today I was playing with the THUMBSIZE variable in AutoCAD Mechanical 2015 and 2017, and noticed that it does not affect the preview image size at all when using above OjectARX method.
I am reading the thumbnail of a DWG file and save it to a separate location as follows:
HRESULT hr = E_FAIL;
HBITMAP HBitmap;
HPALETTE HPalette;
bool succeeded = acdbGetPreviewBitmapFromDwg(strDocumentName, &HBitmap, &HPalette);
if (succeeded)
{
CBitmap bitmap;
bitmap.Attach(HBitmap);
CImage image;
image.Attach(bitmap);
hr = image.Save(strThumbnailFullFileName, Gdiplus::ImageFormatBMP);
}
DeleteObject(HBitmap);
DeleteObject(HPalette);
return hr;
It does not matter if I set the varriable THUMBSIZE to 0 or 1 or any value up to 8, the image saved to strThumbnailFullFileName has always:
- 256 px width
- 97 px height
- 96 DPI
- 25.3 KB file size
I have already read this thread: http://www.cadtutor.net/forum/showthread.php?82513-thumbnails-of-paper-space-sheets-are-too-small since the author noticed a similar problem in Windows Explorer but the issue has not been resolved yet.
Does anyone know how I can get a bigger preview image out of the DWG?
Kind regards and have a nice day,
Bettina
CIDEON
take the value perspective.