question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

don't upscale images during thumbnail creation

See original GitHub issue

There should be an option to not create new images when the thumbnail would generate an upscaled version, but return the original image instance instead.

I propose an upscale=False kwarg to image.thumbnail(), and plan to default it to True at some point in the future.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
xlotlucommented, May 16, 2018

Oops, brain fart. I meant default True initially to preserve backwards-compatibility, and change it to False in the future. Sorry for the confusion.

Ideally there would be a nice deprecation warning for at least one version before that, django-style.

0reactions
nixjdmcommented, May 23, 2018

😕 I think we agree, actually. Let me double check / try to clarify.

so returning the original should be expected behaviour.

I think that is what I’m trying to say. It should be expected behavior, but currently isn’t. So short term we pave the way to fix it, and long term we actually fix it (and break backwards compatibility). Short term, keep default upscale=True to keep backwards compatibility (which currently is implicit), but add the feature upscale=False. Long term, break backwards compatibility by making upscale=False the default.

Perhaps we disagree about what to do for upscale=False? I’m not sure. I was saying that should return the original image, which I think you’re saying you want as well. The alternative is throwing an error.

Thanks for your patience hashing this out. It is a confusing topic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thumbnails: Upscale low-resolution images #1856 - GitHub
Context: A lot of my photo library comes from WhatsApp images which are shared at lower resolution than the original.
Read more >
Is it possible to resize a thumbnail image to high-resolution ...
First of all visit the PixCut website on Homepage click on Products menu on the top then click on “Upscale Image” tool and...
Read more >
How to Make Images Larger Without Losing Quality: Real Tests!
Learn to resize and make images larger without losing quality with the best tools for the job. We compare each enlarger with vigorous...
Read more >
Midjourney! My tips & tricks for getting great images - YouTube
Today we check out the MidJourney AI (artificial intelligence) art creation tool! Let's learn how to use MidJourney with this tutorial and ...
Read more >
How to Resize an Image Correctly | The TechSmith Blog
Open your screenshot or image in the Snagit Editor, select “Image” from the top menu, then “Resize Image.” Before changing the dimensions, notice...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found