Get image transparent background color?

Get image transparent background color?

JamesMaeding
Advisor Advisor
517 Views
0 Replies
Message 1 of 1

Get image transparent background color?

JamesMaeding
Advisor
Advisor

I have a jpg attached, and the transparent color is set to black:

 

blk.jpg

 

Oddly, I just realized only civil3d has that property available.

So I opened the quickwatch in visual studio on the raster object and happened to expand the xdata item.

Look what I found!

xdata.jpg

 

Can you believe it, adesk is using xdata for the transparency color, whoohooo!

What a fluke I found that. The 0 is black, but is a different number if you select some pixel in the image.

 

Guess I answered my own question while writing this.

Not sure why vanilla acad seems to be missing the property in browser, the xdata is still there though.

 

Xdata is a bit easy to erase on accident, but honestly I would rather they add new features this way than modifying the core entity definition and force new dwg version.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Likes
518 Views
0 Replies
Replies (0)