966
asked on
PNG Components
Hi, ive installed PNGComponents, and it doesnt let me load a file into timage called PNG. It only allows JPG, ico.. but no PNG.
How do i get PNG to load into the program im making at design time. The same way the timage normally works with a bmp.
How do i get PNG to load into the program im making at design time. The same way the timage normally works with a bmp.
ASKER
Thanks for the help. I used an auto installer that was a .exe that did it all for me. Ive added pngimage in uses, but i still cannt have the option to import the png in, its dam odd.
ASKER
is there some code i have to type, or should it work the same way as timage? Like.. when i drop an image on a delphi form, and select picture props and i should be able to browse a PNG right?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
im using the same one. i did a search for PNG_D>.pdk it cant find it on my computer anywhere. where is it located \delphi ?? so you think if i reinstall the whole pngcomponents it will work maybe?
ASKER
yeah ur right mate, i reinstall did the trick. I checked that line of code in the section and this time it compiled. cheers mate, ur a star
ASKER
Great!
{$IFDEF UseDelphi}{$IFDEF RegisterGraphic}
TPicture.RegisterFileForma
{$ENDIF}{$ENDIF}
which register the PNG file format in the TPicture class. Make sure you add this pngImage in the uses of your project, and check in debug that this line is compiled (there could be a pb with conditional defines) & executed. If not, then maybe it's because you have added the unit in your project (not only in the uses) and it is therefore recompiled without the UseDelphi & RegisterGraphic conditionals.
either remove it from the project, or add the conditionals in your project (which is not the best option, but could help you moving on before fixing properly)