View Full Version : PNG in Delphi
Voltrox
03-03-2007, 02:56 AM
Hello,
I am having problems with GIFS because they look messed up when I use semi-transparent images, so I can only save it in PNG for it to look decent, but Delphi doesn't support PNG either.
I found a thing called PNGDelphi.
The instructions don't tell me how to install it in Delphi 2006.
Could someone please help me?
Or could someone recommend another component or library?
Thank you.
http://pngdelphi.sourceforge.net/
that is the way to go
3_of_8
03-03-2007, 09:34 AM
Well, if it's a package, install it. If it's a unit, include it.
Voltrox
03-03-2007, 12:27 PM
This is what the help file says about installation (the only page on installation).
Ok, it works now, thank you...BUT...I have a grey transparent lense in the image, and it looks green now(the colour behind the lens), I want to be able to see through that transparent lens onto whatever is behind the program, help?
I think it's the because my Transparentcolour is set to clGreen.
But I don't know of any other way to make it transparent how I want it.
Thanks. :)
-------------------------------------------------------------------------------------
Beginning with the version 1.53, the component is distributed with its own Delphi packages and should be installed as any other components.
All you have to do is install the packages within Delphi environment. This usually is simple as:
First of all, copy (unzip) all the files to any directory (mainting the original directory structure);
Go to the package sub-directory using Windows Explorer;
Opening the package for your version of Borland Delphi. This will open the Delphi environment;
Press the Install in the window that will pop up.
You have just installed PngImage, now close the package window (Don't forget to put "Yes" when it ask if you want to save the package).
You may also want to add the unit to the search path (instructions for Delphi 5).
This time, go to the "Tools" menu and select the item "Enviroment Options".
Click on the "Library" page.
On the field "Library path" add a ";" followed by the unit directory. For instance ";c:\png".
Click on the ok button.
Robert Kosek
03-03-2007, 04:29 PM
PNGImage has a flaw in the latest release that normalizes and strips certain data; I am not sure if this is the same component you are using. Personally, I'd suggest Vampyre (http://imaginglib.sourceforge.net/).
savage
03-03-2007, 05:15 PM
I was trying to get a cross-platform version of libpng headers to work, but have been distracted. It works on Windows, but needs further work for it to work on Linux, MacOS X etc.
Chebmaster
04-03-2007, 07:26 AM
Look in the direction of KambiUtils - it has a nice cross-platform libpng module in it.
I use a castrated version of it in my projects.
Voltrox
13-03-2007, 05:02 PM
Thanks for your help, it should work I guess in the pro version, but, it says that I can't install components in that version. (Turbo Explorer)
Chebmaster
15-03-2007, 01:42 PM
The only Delphi I ever used was Turbo Explorer.
I didn't install any components, I just ripped a chunk of Kambi's sources, patched it a bit so it could work on its own, and used it that way. Also, 95% of my time I use Free Pascal, not Delphi.
But. I now completely moved to this: http://imaginglib.sourceforge.net/
Immensely more powerful one.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.