This image is 3840 × 2160:
testHorizontal.zip
The copyResize function silently produces corrupted TIFF output when resizing an image to a height that is not a multiple of the original height (e.g., 1234). However, it works correctly for heights like 720 or 1024.
var resizeImage = img.copyResize(refImageCompatibleImage, height: 1234);
img.Image editedImage = img.adjustColor(
resizeImage,
brightness: brightness,
);
Uint8List editedImageEncoded = img.encodeTiff(editedImage);
File editedImageFile = await getNewTempFile("EditedImage", ".tiff");
await editedImageFile.create(exclusive: true);
await editedImageFile.writeAsBytes(editedImageEncoded);
return editedImageFile.path;
Issues
- Silent Failure: The function does not throw an error for unsupported heights.
- Unexpected Behavior: The function should resize to any height, or document constraints and enforce them via exceptions.
This image is 3840 × 2160:
testHorizontal.zip
The copyResize function silently produces corrupted TIFF output when resizing an image to a height that is not a multiple of the original height (e.g., 1234). However, it works correctly for heights like 720 or 1024.
Issues