public Picture getSub(int x, int y, int w, int h) {
Picture img = new Picture();
if (isValid()) {
img = new Picture(getContent().submat(new Rect(x, y, w, h)));
}
<BUG>return img;
}</BUG>
public String save(String name) {
String fpName = getValidImageFilename("_" + name);
File fName = new File(getBundlePath(), fpName);

public Picture getSub(int x, int y, int w, int h) {
Picture img = new Picture();
if (isValid()) {
img = new Picture(getContent().submat(new Rect(x, y, w, h)));
}
return img;
}
public Picture getSub(Element elem) {
return getSub(elem.x, elem.y, elem.w, elem.h);
}
public String save(String name) {
String fpName = getValidImageFilename("_" + name);
File fName = new File(getBundlePath(), fpName);
