Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: pillarboxes are added to square images when scaling thumbnails #282

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

Closed
larsoner opened this issue Aug 2, 2017 · 3 comments
Closed

Comments

@larsoner
Copy link
Contributor

larsoner commented Aug 2, 2017

I couldn't figure out why I couldn't get my square-figure output to be size 250x250, then I looked at the actual thumbnail image, and it looked like this (ignore the improperly captured static image, this is a Mayavi problem that I need to track down), which I have put in a quoted bit of text so you can see the offset:

sphx_glr_plot_fmri_activation_thumb

This gets created from this original image, which has no such offset:

sphx_glr_plot_fmri_activation_001

In other words, SG adds white pillars on either side of the otherwise square image. It seems like this shouldn't be necessary and that CSS should be able to take care of whatever purpose this would serve (e.g., centering the element) instead. Can the rescaling routines be changed to fix this?

@larsoner
Copy link
Contributor Author

larsoner commented Aug 2, 2017

... alternatively, we could expose a thumbnail_size parameter, since the current code will force all real thumbnail images to be 400x280 here and uses pillar / letterboxing to fill any gaps.

I'm also not sure why the "failing example" ones get set to a different size. I guess both sizes are bigger than the default that CSS forces them to be, but I don't see much point in them being different.

@larsoner larsoner changed the title BUG pillarboxes are added to square images when scaling thumbnails BUG: pillarboxes are added to square images when scaling thumbnails Aug 2, 2017
@choldgraf
Copy link
Contributor

I guess another option would be to add (yet another) configuration parameter (e.g. pillar_width:). Dunno how I feel about that though...

@larsoner
Copy link
Contributor Author

larsoner commented Aug 3, 2017 via email

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