One of Delphi 2009's advertised features was PNG support. That's great, because the Unicode issues break the pngimage.pas library I was using before. Only problem is, I can't find the Delphi 2009 version. Anyone know what it's called, and how difficult it is to migrate existing pngimage.pas-based code to the new library?
+1
A:
You can read png images into a TImage control. Just like gif, jpg, emf, wmf, bmp.
Not sure if that's what you want.
Gamecat
2008-10-31 21:24:31
No. I'm not looking for anything VCL-related. I'm trying to load them into a game engine with its own blitter. D2009 broke my PNG library and I can't find the replacement it says it provides, and that bugs me.
Mason Wheeler
2008-10-31 21:35:15
Just so someone won't misinterpret your comment here, my guess is that your subsequent acceptance of Nick's answer means that D2009 does indeed have the PNG support you expected.
Argalatyr
2008-10-31 23:52:32
Yeah. He also pointed out where to find the base PNG library that's not dependent on the VCL.
Mason Wheeler
2008-11-02 19:48:48
+7
A:
All VCL image support in Delphi is provided via TImage. If you want to display a PNG image, simply drop a TImage control and then load a PNG image into the Picture property.
If you want to manipulate a PNG image in code (i.e., not display it) then you can add
pngimage
to your uses clause, and then use the TPNGImage class directly.
On my machine, PNGImage.pas is found at:
C:\Program Files\CodeGear\RAD Studio\6.0\source\Win32\vcl\Imaging\PNGImage\pngimage.pas
Nick Hodges
2008-10-31 22:26:26
also TImageList supports PNG, you can load Png images into it, and use it in Toolbar or other controls.
Mohammed Nasman
2008-11-02 08:31:04