I use the TImage component to load some png images, but some of them have the extension .imp. I am adding the Vcl.Imaging.pngimage module to my code and I am using this code to upload images
if OpenDialog1.Execute then
Image1.Picture.LoadFromFile(OpenDialog1.FileName);
But when the LoadFromFile procedure is executed, an exception is thrown
Unknown Image File Extension (.imp)
these images (.imp) are png files created by the extended application and are located in a read-only folder, so renaming these files is not an option, the question is: how can I load a Png image in the TImage component from a file with a different extension?
source
share