int extoff = fn.lastIndexOf('.');
if (extoff >= 0) {
ext = fn.substring(extoff+1);
fn = fn.substring(0, extoff);
}
<BUG>if ((!ImageFormat.FORMAT_PNG.getFileExt().equalsIgnoreCase(ext)) && (!ImageFormat.FORMAT_JPG.getFileExt().equalsIgnoreCase(ext))) {
continue;</BUG>
}
int zoom = 0;
if (fn.startsWith("z")) {

int extoff = fn.lastIndexOf('.');
if (extoff >= 0) {
ext = fn.substring(extoff+1);
fn = fn.substring(0, extoff);
}
ImageEncoding fmt = ImageEncoding.fromExt(ext);
if (fmt == null) {
continue;
}
int zoom = 0;
if (fn.startsWith("z")) {
