Click here to Skip to main content
15,885,143 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I need to convert a picture to 32bpp, or ARGB, in visual basic. That is, I need to add an alpha channel to a picture that doesn't have one. This is my attempt:
VB
Dim a = New Bitmap( _
 My.Application.Info.DirectoryPath & "\ping.png")
         Dim b As New Bitmap(a.Width, a.Height)
         Dim g As Graphics = Graphics.FromImage(b)
         g.DrawImage(a, 0, 0)
         PictureBox1.Image = b
         g.Dispose()

This resizes the image somehow - makes it bigger but then crops it to the original's size.
Posted
Updated 14-Jan-13 3:57am
v2

1 solution

I wish, following link will help you to find out your answer;
http://code.msdn.microsoft.com/windowsdesktop/Image-Conversion-in-VBNET-88a4da26[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900