Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Rene_Gerlach
390 Views, 4 Replies

CreateImageWithOptions - TransparentBackground = true

Did someone tried this option and get saved the Image transparent?

 

It returns a IPictureDisp.

The type inside IPictureDisp is PICTYPE_BITMAP.

The attributes (PICTUREATTRIBUTES) are 0, so no PICTURE_TRANSPARENT(2) is set.

 

So for what is TransparentBackground = true usable?

 

Shouldn't IPictureDisp be of type PICTYPE_ICON or PICTYPE_METAFILE which are supporting transparency.

Rene_Gerlach
in reply to: Rene_Gerlach

Any comment from Autodesk?

WCrihfield
in reply to: Rene_Gerlach

You probably already know about this one, but there is a 'Remark' at the bottom of the online help page for that method (CreateImageWithOptions) that may help.  It basically says that if you currently have an image set as background within Inventor, it will ignore your settings for background when creating this image.  Then says you can check the status of this with ColorSchemes.BackgroundTypeColorSchemes is a ReadOnly property of the Inventor application, and the second property returns a value from the BackgroundTypeEnum.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

ls-4453
in reply to: Rene_Gerlach

This appears to still be a problem in Inventor 2022. Using TransparentBackground = True with Camera.CreateImageWithOptions produces an IPictureDisp which does not have a transparent background.

 

Does anyone from Autodesk have any input? Sure they didn't intend for this option to do absolutely nothing.

 

Currently, the only way to get a transparent image is to use View.SaveAsBitmapWithOptions, which clearly isn't a solution because it requires creating a view for every single image.

ls-4453
in reply to: Rene_Gerlach

Bump. How can we get assistance with this? It's not as if we get this software for free.