@Override
    public boolean accept(File f)
    {
        if (f.isDirectory()) return true;

        String extension = getExtension(f);
        return extension != null && (extension.equals(tiff) || extension.equals(tif) || extension.equals(gif) || extension.equals(jpeg) || extension.equals(jpg) || extension.equals(png));

    }