alogrep 0 Posted September 3, 2021 Hi I have some legacy units with lots of glyph loaded with tpngoject. In my old Delphi the images are show well. In 10.4, they are simply ignored, not shown. If I inspect the DFM loaded in 10.4 the DATA section of the glyph is not present. Is there any way to make those units in 10.4 easier (or faster) than reload the images 1 by 1? ( I would also like to preserve the original unit to be used with the older version). Thanks. Share this post Link to post
Uwe Raabe 2064 Posted September 3, 2021 Install PngComponents - it registers the old format per default. Share this post Link to post
alogrep 0 Posted September 4, 2021 Than you Uwe. How do I install it? I dowloaded PackagesSydney and trying to build PngComponentsDesign I get a list of errores Tpngimagelist .... not found. If I try to build PngComponents I get the error "...source\PngSpeedButton not found" not found. Share this post Link to post
Uwe Raabe 2064 Posted September 4, 2021 You should download all files from the repository. Share this post Link to post
alogrep 0 Posted September 4, 2021 Thanks Uwe. But still cannot have the glyph png image shown. I built and installed ok PngComponentsDesign.dpk (it shows in install packages. see attached image). I built PngComponents.dpk. But a form with components using a png image does not show the image (in my older delphi they show ok). Any hint as to what else should I do? Share this post Link to post
alogrep 0 Posted September 4, 2021 Sorry, it workds fine!. I think the error was that I had put in the library pngcomponents\PngObject\ (the newly installed package). I removed it and all is ok. Thank you very much Share this post Link to post
Uwe Raabe 2064 Posted September 4, 2021 Indeed, the PngObject contains the files needed for versions below Delphi 2009, while since then these units are part of the Delphi standard libraries and can must be omitted. Share this post Link to post
alogrep 0 Posted October 23, 2021 Hello Uwe. I am in trouble again. I left my project for a couple of months, and now again have the same problem: The design components show in insstalled packages, but the unit with tpngobject images do now show the image. I uninstalled the package., I re-installed PngComponentsDesign.dpk from the sydney folder. I also re-named pngcomponents\pngobject to make sure it does not interfere in any way. But the (content of the) images are not not shown. Share this post Link to post
cdxfish 0 Posted August 30 Hi Guys Greeting. I am trying to install https://github.com/UweRaabe/PngComponents/releases/tag/V1.9.0 with Delphi 10.4.2 Sydney. And I open PackagesSydney folder and install with "PngComponents". When I complie with win32, I get the below errors: It seems the PngObject is too old for 10.4.2. I am using default settings, but how can I install it? From the folders of "PngComponents", seems it do support 10.4. But actaully, it can not work. I remember PngObject worked fine in Delphi2010. so is there any suggestion? thank you. Share this post Link to post
Uwe Raabe 2064 Posted August 30 pngimage.pas should never be compiled in 10.4.2. It is not even part of PngComponents as it already exists as Vcl.Imaging.pngimage.dcu in the Delphi library path. You should delete that pngimage.pas and probably pnglang.pas, too. 1 Share this post Link to post
JonRobertson 72 Posted August 30 I was bit by this once when trying to swap the GetIt version with the github version. I switched back to the GetIt version. Share this post Link to post
cdxfish 0 Posted September 2 On 8/30/2024 at 9:03 PM, Uwe Raabe said: pngimage.pas should never be compiled in 10.4.2. It is not even part of PngComponents as it already exists as Vcl.Imaging.pngimage.dcu in the Delphi library path. You should delete that pngimage.pas and probably pnglang.pas, too. HI Uwe Thank you so much for your reply. You are right, but seems we need to modifed the source code of PngComponents. The way is replace pngImage with vcl.Imaging.pngImage. In this way, we can complie the pngComponent successful. But seems the system component, TSpeedButton still can use bmp format, I don't know, why Delphi not suport TSpeedButton use PNG directly, you know, it's already contain VCL.imaging.pngImage internally. Anyway, it works, so thank you so much. Share this post Link to post
Lajos Juhász 295 Posted September 2 The glyph is an old "obsolate" property to assigning the image, also using png is an old and should not be used in modern applications. Nowdays you should use svg stored in virtual image list to be able to support various DPI settings. Share this post Link to post
Uwe Raabe 2064 Posted September 2 2 hours ago, cdxfish said: The way is replace pngImage with vcl.Imaging.pngImage. That would break compatibility with older Delphi versions. Either these changes have to be wrapped in some IFDEF directives or one has to specify at least Vcl.Imaging in Unit Scope Names of the project using the library. Share this post Link to post