【发布时间】:2014-02-18 23:52:56
【问题描述】:
我正在使用轨迹栏上的此代码放大图片框中的图像。
Private Sub tbrZoomLevel_Scroll(sender As System.Object, e As System.EventArgs) Handles tbrZoomLevel.Scroll
With pbImage
.SuspendLayout()
.Width = actualSize.Width * tbrZoomLevel.Value
.Height = actualSize.Height * tbrZoomLevel.Value
.ResumeLayout()
End With
End Sub
pbImage 是一个 PictureBox 控件,以 sizemode 作为缩放。 actualSize 是 pbImage 中图像的原始大小。
当我放大时,我得到的图像没有像素化。但我希望它完全像素化并显示图像,如 MS Paint on zooming 所示。任何帮助表示赞赏。欢迎使用 VB.Net 代码、C# 代码或任何算法。
【问题讨论】: