VB6 PictureBox SavePicture - save picture as png?
Asked Answered
U

4

3

With VB6 PictureBox, how do I save to the png format?

Unclinch answered 20/9, 2010 at 18:20 Comment(0)
M
3

You can't. The VB6 PictureBox only supports Bitmap, icon, metafile, GIF, and JPEG image types. You'll need to use something else if you wish to work with PNG files. Perhaps the Windows Image Acquisition Automation Library would be of use to you.

Mcalpin answered 20/9, 2010 at 18:44 Comment(0)
B
3

Check out the cPNGWriter.cls file in LaVolpe's 32bpp Suite:

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=67466&lngWId=1

As stated in the class comments, it does require zlib.

Buffon answered 21/9, 2010 at 8:39 Comment(0)
C
-1

You can write a DLL to save in PNG in VB.Net and then call from VB6. From VB6 graphics guru Rod Stephens

Circumnavigate answered 21/9, 2010 at 19:36 Comment(2)
True, but that sorta defeats the purpose of using VB6 over .NET when you have to check for/install the .NET framework with your app.Buffon
@Joe I see your point, but you might have an existing VB6 app that you wish to extend to support PNG.Circumnavigate
W
-1

The best and easiest way - use the GDIPlus Library. If you don't know how, google it

Whitleather answered 11/10, 2012 at 20:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.