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

SmartResize only on thumbnails #315

Open
anarcat opened this issue Mar 12, 2018 · 4 comments
Open

SmartResize only on thumbnails #315

anarcat opened this issue Mar 12, 2018 · 4 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Mar 12, 2018

I've tried switching from img_processor = 'ResizeToFit' (commented out, actually, assuming that's the default) to img_processor = 'SmartResize' after to confirm this comment. turns out it's true: the "normal" sized images are cropped when using the latter, but not the former.

example, with ResizeToFit:

image

with SmartResize:

image

notice how the left building is chopped off? here's the original image (or a screenshot of it, actually, because the original is too big for GH) for comparison:

snap-2018 03 12-11 47 42

it seems to me the main view shouldn't be cropped... does that make sense?

@saimn
Copy link
Owner

saimn commented Mar 27, 2018

I think ResizeToFit respects the original aspect ratio, even if the width (or height?) must be smaller, whereas SmartResize respects the size given in input, cropping the dimension that is too big. Does that makes sense ?

@anarcat
Copy link
Contributor Author

anarcat commented Mar 27, 2018

hmm... okay, that makes sense. is there, however, a way to avoid cropping the full images yet still use SmartResize for thumbnails? In other words, it would be great if there would be different processors for thumbnails vs normal images. It seems to be what you're saying in #64, but I'm not sure...

@saimn
Copy link
Owner

saimn commented Apr 4, 2018

Thumbnails are not created with pilkit's processors, but they are created from the resized image. So currently the answer is no.

@anarcat anarcat changed the title SmartResize shouldn't resize normal sizes SmartResize only on thumbnails Apr 8, 2018
@anarcat
Copy link
Contributor Author

anarcat commented Apr 8, 2018

okay, that makes sense i guess.. i've changed the title to clarify this might be just a feature request then....

i guess this would mean double-processing which is why it's not done by default?

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