We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the following code producing "invalid bounding box"?
use ril::prelude::*; fn main() -> ril::Result<()> { let mut image = Image::<Rgba>::open("sample.png")?; let (width, height) = image.dimensions(); let vertices = vec![(50, 0), (100, 25), (100, 75), (50, 100), (0, 75), (0, 25)]; let border = Border::<L>::new(L(255), 1); let hexagon = Polygon::from_vertices(vertices) .with_fill(L(255)) .with_border(border); let mut mask = Image::new(width, height, L(0)); mask.draw(&hexagon); image.mask_alpha(&mask); image.save_inferred("sample_hexagon.png")?; Ok(()) }
This error doesn't happen if you remove .with_border(border);.
.with_border(border);
By the way, this is sample.png: https://i.stack.imgur.com/hTIji.jpg. It's a png image of 1024 x 1024 pixels.
sample.png
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Why is the following code producing "invalid bounding box"?
This error doesn't happen if you remove
.with_border(border);
.By the way, this is
sample.png
: https://i.stack.imgur.com/hTIji.jpg. It's a png image of 1024 x 1024 pixels.The text was updated successfully, but these errors were encountered: