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

images/thumbnails should be scaled smarter #553

Closed
Hoffi1 opened this issue Jan 19, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@Hoffi1
Copy link
Contributor

commented Jan 19, 2014

Uploaded images (e.g. event) are always resized to 100x100 (as configured). Images like Joomla's compat_25 (75x16) are upscaled to something like 468x100 and then truncated to 100x100. Instead it should be scaled to around 100x21.
Additionally a JEM setting to upscale or not (=downscale only) could be useful.

@JKoelman

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2014

maybe the image class can be adapted... Instead of crop from center (line 50) we could use ZEBRA_IMAGE_BOXED (or other settings)

@Hoffi1

This comment has been minimized.

Copy link
Contributor Author

commented Jan 20, 2014

Found it, should work. 👍 But I would suggest to use ZEBRA_IMAGE_NOT_BOXED instead and together with color -1 (transparent) because e.g. jpeg doesn't support transparency. To reserve configured size a surrounding div should be used.
I will try a bit...

@Hoffi1

This comment has been minimized.

Copy link
Contributor Author

commented Jan 20, 2014

It works and for me looks good without placeholder div surrounding.

But there are problems with category images. It seems if uploaded image exactly matches requested width/height it is not copied to small/ and so not shown in frontend.

So I need some more time...

@ghost ghost assigned Hoffi1 Jan 20, 2014

@jojo12

This comment has been minimized.

Copy link
Contributor

commented Jan 25, 2014

is this a bug or a enhancement?

@Hoffi1

This comment has been minimized.

Copy link
Contributor Author

commented Jan 25, 2014

Depends on point of view. 😄

Not cropping is more like an enhancement, but it's very easy to change (one word).

But the thing with category images already matching exact target width/height could be a bug independant of the other change - not sure, havn't it tested yet.
If you like, Jojo, upload an image with exact width/height as configured (100x100 is the default) to a category (backend) and take a look at frontend.

Hoffi1 added a commit that referenced this issue Mar 1, 2014

altered thumbnail scaling (issue #553)
- ensure full image is inside max. area
- don't scale up
- css correction

@Hoffi1 Hoffi1 closed this Mar 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.