out.closeEntry();
writtenImages.put(image.getRelativeURL(),image.getBufferedImage());
}
}
if(i instanceof PatternPaint) {
PatternPaint paint = (PatternPaint) i;
if(!writtenImages.containsKey(paint.getRelativeURL())) {
u.p("saving the real pattern paint with relative url " + paint.getRelativeURL());
ZipEntry ie = new ZipEntry(dir+"/resources/"+ paint.getRelativeURL());
out.putNextEntry(ie);
ImageIO.write(paint.getImage(),"png",out);
out.flush();
out.closeEntry();
writtenImages.put(paint.getRelativeURL(),paint.getImage());
}
}
}
out.close();
}