Prev: MDI GUI
Next: How to run MultiDigiMon.exe ?
From: Peter Olcott on 1 Mar 2010 14:31 I need a good Library for reading and writing PNG files. Which one are the best?
From: Giovanni Dicanio on 1 Mar 2010 15:42 "Peter Olcott" <NoSpam(a)OCR4Screen.com> ha scritto nel messaggio news:0vqdnaU94IWaixHWnZ2dnUVZ_g6dnZ2d(a)giganews.com... > I need a good Library for reading and writing PNG files. Which one are the > best? The official library to manage PNG files should be libnpg: http://www.libpng.org/pub/png/libpng.html However, there is a convenient C++ class for (amongst other things) read and write PNG images: CxImage http://www.codeproject.com/KB/graphics/cximage.aspx HTH, Giovanni
From: David Webber on 3 Mar 2010 17:31 "Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote in message news:0vqdnaU94IWaixHWnZ2dnUVZ_g6dnZ2d(a)giganews.com... > I need a good Library for reading and writing PNG files. Which one are the > best? The native CImage class will write (and, I believe though I don't do it, read) png files. Roughly, if you have an HBITMAP and a file name: CImage image; image.Attach( hBitmap ); HRESULT hResult = image.Save( pszFilename, ImageFormatPNG ); image.Detach(); [This may need XP or later - haven't checked recently. When I needed to support Win98 I used a library called FreeImage.] Dave -- David Webber Mozart Music Software http://www.mozart.co.uk For discussion and support see http://www.mozart.co.uk/mozartists/mailinglist.htm
From: Peter Olcott on 3 Mar 2010 21:00 "David Webber" <dave(a)musical-dot-demon-dot-co.uk> wrote in message news:eUwjTFyuKHA.6124(a)TK2MSFTNGP04.phx.gbl... > > > "Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote in message > news:0vqdnaU94IWaixHWnZ2dnUVZ_g6dnZ2d(a)giganews.com... > >> I need a good Library for reading and writing PNG files. >> Which one are the best? > > The native CImage class will write (and, I believe though > I don't do it, read) png files. Roughly, if you have an > HBITMAP and a file name: > > > CImage image; > image.Attach( hBitmap ); > > HRESULT hResult = image.Save( pszFilename, > ImageFormatPNG ); > image.Detach(); This turned out to be the best solution, and the one that I am using. > > [This may need XP or later - haven't checked recently. > When I needed to support Win98 I used a library called > FreeImage.] > > Dave > -- > David Webber > Mozart Music Software > http://www.mozart.co.uk > For discussion and support see > http://www.mozart.co.uk/mozartists/mailinglist.htm
|
Pages: 1 Prev: MDI GUI Next: How to run MultiDigiMon.exe ? |