I'm learning to program in Java and right now I'm trying to make a program with GUI in Swing, which would make a slideshow out of images in a given directory. Now, my question is can you check whether a file is really an image?
I'm talking about a file that not only has the correct extension, like e.g. .jpg or .png, but also contains content that is.. interpretable as an image I guess? My wording here might not be precise.
I know I'm asking for quite a bit, but I'd be very grateful if someone could answer that. (Not a duplicate of Test if a file is an image file, because I think that the author there meant the extensions themselves).