Skip to content

Commit

Permalink
Use height() for y axis to support non-square icons
Browse files Browse the repository at this point in the history
  • Loading branch information
tigercat2000 committed Dec 30, 2024
1 parent 0af5f99 commit 78a7e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iconforge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ fn transform_image(image: &mut RgbaImage, transform: &Transform) -> Result<(), S
apply_all_transforms(&mut other_image, &icon.transform)?;
};
for x in 0..std::cmp::min(image.width(), other_image.width()) {
for y in 0..std::cmp::min(image.width(), other_image.width()) {
for y in 0..std::cmp::min(image.height(), other_image.height()) {
let px1 = image.get_pixel_mut(x, y);
let px2 = other_image.get_pixel(x, y);
let pixel_1 = px1.channels();
Expand Down

0 comments on commit 78a7e44

Please sign in to comment.