C# large picturebox darkens on right side
I am currently developing a screensaver that simulates the iPhone lockscreen.. I am using some large picturebox to display t开发者_如何学Gohe "header" and "footer" locations, but they have a strange behavior: on the right side of the picturebox is a "shadow like thing" that darkens the picture. Here a screenshot (watch the right side):
lockscreen
I am sure that its not from the picture itself that I am using, as this is just a tile (1 pixel width) that fills the picturebox!
If you want to see it on your computer, you can get the screensaver from here: iPhoneLS
Why does this "shadow" occur? Thanks for your help!
You probably set the Image
property of the PictureBox
? I believe the image scaling of the picture box in StretchImage
mode is not very accurate and thus causes the artifact (which I just verified by taking a 1px wide part of your screenshot and scaling that to the entire width of my screen using a PictureBox
). Try to set the BackgroundImage
property instead (having BackgroundImageLayout
set to Tile
), which does not stretch the image. You don't need a PictureBox
for that purpose though.
精彩评论