我使用VB.net列表视图中的低质量缩略图VB.net
我使用ListView查看项目左侧的50 * x缩略图(.jpg)。
但是,而不是32位高品质的缩略图,ListView降低他们到8位或16位(不确定)。
下面的代码
Private Sub afterprocessed()
ListView1.Items.Clear()
Dim imlTemp As New ImageList
Dim dirFiles() As String = IO.Directory.GetFiles("backend\communicate\thumbnails")
Dim _imgList As New ImageList
Dim imgSize As New Size
imgSize.Width = 50
ListView1.SmallImageList = _imgList
Dim count As Integer = 0
Dim item As New ListViewItem
For Each dirFile As String In dirFiles
Dim imgFilename As String = IO.Path.GetFileNameWithoutExtension(dirFile)
Dim img As New System.Drawing.Bitmap(dirFile)
Dim imgImage As Image = Image.FromFile(dirFile)
'Dim imgHeight As Integer
'imgHeight = imgImage.Height
imgSize.Height = imgImage.Height
_imgList.ImageSize = imgSize
_imgList.Images.Add(img.Clone)
ListView1.Items.Add(imgFilename, count)
count += 1
Next
End Sub
,质量noticably低。与原始JPG相比
有什么建议吗?我非常感谢它:D
你可以发布原始和低质量版本的屏幕截图吗? – 2012-08-01 11:29:23