本文整理匯總了VB.NET中System.Drawing.Imaging.ImageAttributes.SetNoOp方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET ImageAttributes.SetNoOp方法的具體用法?VB.NET ImageAttributes.SetNoOp怎麽用?VB.NET ImageAttributes.SetNoOp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing.Imaging.ImageAttributes
的用法示例。
在下文中一共展示了ImageAttributes.SetNoOp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: SetNoOpExample
Public Sub SetNoOpExample(ByVal e As PaintEventArgs)
' Create an Image object from the file Camera.jpg.
Dim myImage As Image = Image.FromFile("Camera.jpg")
' Create an ImageAttributes object, and set the gamma to 0.25.
Dim imageAttr As New ImageAttributes
imageAttr.SetGamma(0.25F)
' Draw the image with gamma set to 0.25.
Dim rect1 As New Rectangle(20, 20, 200, 200)
e.Graphics.DrawImage(myImage, rect1, 0, 0, 200, 200, _
GraphicsUnit.Pixel, imageAttr)
' Call the ImageAttributes NoOp method.
imageAttr.SetNoOp()
' Draw the image with gamma set to 0.25, but now NoOp is set,
' so the uncorrected image will be shown.
Dim rect2 As New Rectangle(250, 20, 200, 200)
e.Graphics.DrawImage(myImage, rect2, 0, 0, 200, 200, _
GraphicsUnit.Pixel, imageAttr)
' Image
End Sub