Using vxl 1.11.0 on Windows XP, there appears to be a problem writing
cropped images to tiff with vil_save(). Specifically, the following
works fine with other formats (bmp, jpg), but when I try to save as
tiff, the crop is always taken starting from the upper-left corner of
the image, ignoring the offsets.
vil_image_view<vxl_byte> crop1 = vil_crop(img, 1, 200, 1, 200);
vil_image_view<vxl_byte> crop2 = vil_crop(img, 51, 200, 51, 200);
vil_save(crop1, "c:/images/crop1.tiff");
vil_save(crop2, "c:/images/crop2.tiff");
My workaround has been to perform a vil_copy_deep before saving.
Thank you,
Yuli
|