Thank Neo,
actually it was helpful.i could convert it very easily.
This is converted code.
Code: Select all
imports system.drawing
imports system.drawing.imagine
public class Form1
private sub Btn_click()
dim img as bitmap=new bitmap(application.startuppath+"/tux.png")
'cheack pixel format of opend image is 32bppRGB
if not img.pixelformat=pixelformat.format32bppRgb then
dim tmp as bitmap(img.width,img.height,pixelformat.format32bpp)
dim g as graphics=graphics.fromimage(tmp)
g.drawimage(img,new rectangle(0,0,img.width,img.height),0,0,img.width,img.height,graphicsunit.pixel
tmp.save(application.startuppath+"/tux.bmp")
end if
end sub
end class
i have used Format32bppRgb insted of Format32bppArgb.because i want it.
thank Neo
[ Post made via Mobile Device ] ![Image](https://robot.lk/images/mobile.png)