Skip to content

Commit

Permalink
Merge pull request #1837 from fintelia/issue-1836
Browse files Browse the repository at this point in the history
Support ICO files with dimensions larger than 256
  • Loading branch information
HeroicKatora authored Feb 1, 2023
2 parents 099a4fe + 6a5b618 commit c890d3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codecs/ico/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ impl DirEntry {
}

fn matches_dimensions(&self, width: u32, height: u32) -> bool {
u32::from(self.real_width()) == width && u32::from(self.real_height()) == height
u32::from(self.real_width()) == width.min(256)
&& u32::from(self.real_height()) == height.min(256)
}

fn seek_to_start<R: Read + Seek>(&self, r: &mut R) -> ImageResult<()> {
Expand Down

0 comments on commit c890d3b

Please sign in to comment.