Skip to content

Fixing TypeError: 'float' object cannot be interpreted as an integer when using with Pillow 9.5.0#34

Open
LouissXI wants to merge 2 commits intojay3332:2.0from
AktiCube:2.0
Open

Fixing TypeError: 'float' object cannot be interpreted as an integer when using with Pillow 9.5.0#34
LouissXI wants to merge 2 commits intojay3332:2.0from
AktiCube:2.0

Conversation

@LouissXI
Copy link
Copy Markdown

No description provided.

Comment thread pilmoji/core.py

ox, oy = emoji_position_offset
self.image.paste(asset, (x + ox, y + oy), asset)
self.image.paste(asset, (int(x + ox), int(y + oy)), asset)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.image.paste(asset, (int(x + ox), int(y + oy)), asset)
self.image.paste(asset, (round(x + ox), round(y + oy)), asset)

it's better than just int since you could want negative values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants