public static <T extends ImageInterleaved<T>> T createSubImageOf_I(T input) { // create the larger image T ret = (T) input.createNew(input.width + 10, input.height + 12); // create a sub-image of the inner portion ret = (T) ret.subimage(5, 7, input.width + 5, input.height + 7, null); // copy input image into the subimage ret.setTo(input); return ret; }