Closed dzfrias closed 2 months ago
Currently it's hardcoded, but an option could be added to Resize::Crop
similar to what Fit
has. The actual cropping happens here: https://github.com/benjajaja/ratatui-image/blob/master/src/lib.rs#L291
Okay, thank you! I'll work on a PR implementing something soon.
closed by #27
Hello! Thank you for making such a great crate; it's been a life-saver for automatically handling terminal emulator inconsistencies. I was wondering if it was possible to clip an image from the top, instead of the bottom.
For example, if I have an image that doesn't fit inside it's containing
Rect
(and I've set it Resize::Crop), I want the top of the image to be cut off, not the bottom. Let me know if this is possible, and if it isn't, where I could look to implement it and write a PR.