开发者

Multiple images with the same source?

开发者 https://www.devze.com 2023-02-24 23:22 出处:网络
When I have multiple Images with the same source, does WPF create a separate copy of image data for each Image 开发者_运维百科object, or they share it?can u be a bit more specific ? have a look at Bit

When I have multiple Images with the same source, does WPF create a separate copy of image data for each Image 开发者_运维百科object, or they share it?


can u be a bit more specific ? have a look at BitmapImage on MSDN. you can use CacheOption property to handle how it caches it.


i think, the share

a. added an Image element with image A as source

b. added two Image elements with image A as source for both

c. added three Image elements with image A and image B as sources one for each

looked at the memory consumption in task manager

a < b << c

0

精彩评论

暂无评论...
验证码 换一张
取 消