> which DPI will result in the right size of ImageBrush
Well, that's sort of a trick question - both DPIs can result in the
"correct" size. If, however, you always want the size WPF
reports/measures/etc to be the same as the pixel dimensions, then yes, 96
DPI will produce that mapping. When you look at the Width or Height of a
Bitmap in Avalon, this value is the width (or height) in pixels of the
Bitmap divided by the DPI * 96, because all of WPF's units are 96'ths of an
inch. This is why a bitmap with 96DPI measures at its pixel dimensions,
because the mapping is identity.
Note that a 72x72 pixel bitmap at 72 DPI is really 1 inch by 1 inch and a
96x96 pixel bitmap at 96 DPI is *also* 1 inch by 1 inch, which is why they
will measure the same in WPF even though they have different pixel
-Adam Smith [MS]
"HolaMan" <email@example.com> wrote in message
> Thanks for you reply
> I have checked the pngs and you are right.
> They have different DPI value, one is 72 and the other is 96.
> :which DPI will result the right size of ImageBrush? seems 96
> Thank you.