开发者

TransformedBitmap in WPF is producing black lines under Windows XP

开发者 https://www.devze.com 2023-03-23 04:49 出处:网络
When porting a WPF application from windows 7 to windows XP, I found that where I was displaying a TransformedBitmap, thin, patterned black lines appear vertically down the image on transforms that ar

When porting a WPF application from windows 7 to windows XP, I found that where I was displaying a TransformedBitmap, thin, patterned black lines appear vertically down the image on transforms that aren't power of 2 resizes (1/2, 2, 4).

This is the code used to load the image from a file ('ImageSource'), and apply the transform:

ScaleTransform transform = new ScaleTransform(zoomRate, zoomRate);
ImageDisplay = new TransformedBitmap(new BitmapImage(new Uri(ImageSource)), transform);

Is there a setting or property that controls this, or is it more likely a hardwa开发者_如何学JAVAre or driver issue?

Edit: This appears to be unique to TIFF images - switching to a different image format (like png) caused the image to resize without an issue.

0

精彩评论

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

关注公众号