문제

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