Вопрос

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