Skip to content

Commit

Permalink
fix: corrected hotspot calculation while re-canvasing
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Jun 9, 2024
1 parent 3bb6ec6 commit e79b94c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion src/clickgen/parser/png.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e79b94c

Please sign in to comment.