if image1.Picture='sprite\gun1.png' then 

Types do not match (string and image). How then to check which image is in image1?

  • First, as far as I know, the TIMAGE class does not know how to work with PNG. - Ololo
  • This is a library. - romanzi

2 answers 2

I advise you not to look towards TImage. You probably upload an image into Image using opendialog? So, when you download, just start a variable and write the name of the downloaded file into it, and then compare =)

    You can check by class name:

    • TImage - bmp
    • TPNGImage - png
    • TJpegImage - jpeg