我想使用ImageList通过一个定时器来循环显示图片,它能正常工作,但是同样的图片在PictureBox中以较高的清晰度显示,当使用ImageList来显示相同的PictureBox时就会失去质量。
在PictureBox直接显示图片时的效果:
在PictureBox中使用ImageList来显示图片时的效果(pictureBox1.Image = imglist.Images[0];):
我的图片是一张128x128的png图片,以下是我的PictureBox和ImageList的设计代码:
在PictureBox直接显示图片时的效果:
![enter image description here](https://istack.dev59.com/PovGb.webp)
![enter image description here](https://istack.dev59.com/FnPbB.webp)
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(378, 78);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// imglist
//
this.imglist.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imglist.ImageStream")));
this.imglist.TransparentColor = System.Drawing.Color.Transparent;
this.imglist.Images.SetKeyName(0, "1423093311_supportfemale-48.png");