How to parse an image that was just uploaded to make sure it doesn’t contain malicious code?

How to parse an image that was just uploaded to make sure it doesn’t contain malicious code?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)