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

CreateImageWithOptions - TransparentBackground = true

Rene_Gerlach
Advocate

CreateImageWithOptions - TransparentBackground = true

Rene_Gerlach
Advocate
Advocate

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.

Reply
390 Views
4 Replies
Replies (4)

Rene_Gerlach
Advocate
Advocate

Any comment from Autodesk?

WCrihfield
Mentor
Mentor

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)

0 Likes

ls-4453
Enthusiast
Enthusiast

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.

0 Likes

ls-4453
Enthusiast
Enthusiast

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

0 Likes