I'm looking to reuse some code that draws a images on a device context in a dll. It uses TImage which works fine in the Original program. But in the dll BMPs and TIFFs load fine but it throws an error loading JPGs PNGs and GIFs which the original loaded fine. I'm having troble finding anything in the original code to enable them. I see in Vcl.Graphics that it looks to see if CLR is defined which I tried adding to the Conditional defines of the project but that didn't work. I can't seem to find any other option in the project settings that I'm missing to enable the CLR.

有帮助吗?

解决方案

Include jpeg, pngimage and gifimg to your uses clause. These units enable the usage of the corresponding image types and register their file extensions.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top