// Strip extension.
int dotIndex = name.lastIndexOf('.');
if (dotIndex != -1) name = name.substring(0, dotIndex);
Rect rect = addImage(image, name);
if (rect != null && settings.limitMemory) rect.unloadImage(file);
}
/** The image will be kept in-memory during packing. */
public Rect addImage (BufferedImage image, String name) {
Rect rect = processImage(image, name);