diff --git a/CHANGELOG.md b/CHANGELOG.md index e88dddf..7911d03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +### Issue Fixes + +- Fixed hotspot calculation while re-canvasing + ## [v2.2.4] - 05 June 2024 ### What's New? diff --git a/src/clickgen/parser/png.py b/src/clickgen/parser/png.py index d2811cb..4430702 100644 --- a/src/clickgen/parser/png.py +++ b/src/clickgen/parser/png.py @@ -83,13 +83,13 @@ def _parse(self) -> List[CursorFrame]: ) res_img = self._image.resize((size, size), 1) + res_hotspot = self._cal_hotspot(res_img) if size != canvas_size: canvas = Image.new("RGBA", (canvas_size, canvas_size), (0, 0, 0, 0)) canvas.paste(res_img, (0, 0)) res_img = canvas - res_hotspot = self._cal_hotspot(res_img) images.append( CursorImage( image=res_img,