Both of these are in the same folder. Try
BufferedImage image = ImageIO.read(getClass().getResourceAsStream("HeatMap.png"));
int w = image.getWidth();
int h = image.getHeight();
You can try other options also. Read comments.
// Read from same package
ImageIO.read(getClass().getResourceAsStream("c.png"));
// Read from absolute path
ImageIO.read(new File("E:\\SOFTWARE\\TrainPIS\\res\\drawable\\c.png"));
// Read from images folder parallel to src in your project
ImageIO.read(new File("images\\c.jpg"));