visual-studio-2010imagelibrary

VS2010 Image library, what is the use of the different size pngs?


The VS2010 image library contains several pngs of standard icons (Warning, Error, ...) in different sizes side by side. What is the use of such a png?

  1. Is it meant as source to cut the best size and save it as new png?
  2. Or is there a way to use such a png and the best resolution is picked automatically. And if so, how is this done?

I wonder why there are such side-by-side images and not several files such as Warning32.png, Warning16.png ....

Example: Information.png

Example of side by side image


Solution

  • It is an old programming trick and it is exactly what you assume it to be. The bitmap is a "film roll" and to make it work you have to know the pitch of the images, the resource doesn't tell you. Hard-coded in the source code. Microsoft's source code, you got the copy of their work.