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

PIL Image Method Deprecation Error #106

Open
ManchurianMan opened this issue May 25, 2024 · 1 comment
Open

PIL Image Method Deprecation Error #106

ManchurianMan opened this issue May 25, 2024 · 1 comment

Comments

@ManchurianMan
Copy link

I get the following error when running legofy from the command line: AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

After some quick Googling, it appears that this is an issue with PIL having deprecated this method.

@antsmartti
Copy link

Related with this, I installed legofy using pip in a Ubuntu environment, and still having this error. Example of code from /usr/local/lib/python3.10/dist-packages/legofy/init.py:

def legofy_image(base_image, brick_image, output_path, size, palette_mode, dither):
    new_size = get_new_size(base_image, brick_image, size)
    base_image.thumbnail(new_size, Image.ANTIALIAS)
    if palette_mode:
        palette = get_lego_palette(palette_mode)
        base_image = apply_thumbnail_effects(base_image, palette, dither)
    make_lego_image(base_image, brick_image).save(output_path)

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

No branches or pull requests

2 participants