画像の不透明度を実行するためにVB.Netにサブがありますが、期待どおりに機能しません:
Public Sub mc_SetOpacity(ByRef Image As Image, ByVal Opacity As Double)
Dim vGraphics As Graphics = Graphics.FromImage(Image)
Dim vColorMatrix As New ColorMatrix()
Dim vImgAtt As New ImageAttributes()
vColorMatrix.Matrix33 = Opacity
vImgAtt.SetColorMatrix(vColorMatrix, ColorMatrixFlag.[Default], ColorAdjustType.Bitmap)
vGraphics.DrawImage(Image, New Rectangle(0, 0, Image.Width, Image.Height), 0, 0, Image.Width, Image.Height, GraphicsUnit.Pixel, vImgAtt)
vGraphics.Dispose() : vGraphics = Nothing
vImgAtt.Dispose() : vImgAtt = Nothing
End Sub
誰かが私が間違っていることを教えてもらえますか?