Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added stylize method functionality #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

added stylize method functionality #21

wants to merge 4 commits into from

Conversation

jmichelsen
Copy link
Owner

No description provided.

@jmichelsen jmichelsen assigned jmichelsen and skruger and unassigned jmichelsen Dec 31, 2015
background = img.copy()

w, h = img.size
ratio = FOREGROUND_SIZE['height'] / h
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should probably be cast to floats before being divided. Integer arithmetic will do you no favors when coming up with a ratio factor.

If you want to solve simple proportions while staying in integer territory you will need to multiply before you get to the division step instead of doing the division once and storing it.

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