There are no "shitty libraries", whatever that means. Maybe you misunderstood something. It is theoretically possible to transport malicious code in images, but no library will "check the image" for that. An image library is for loading images, not for detecting malicious content.
The only thing an image loader can do is checking the consistency of the image header, and this only to a certain degree. For PC games, the most common image loading library is DirectX, which is also used by Gamestudio. It tends to crash with bad images, so it seems not to do any checks of that kind. If you want to check the image in any way, you need to do that by script before loading it.