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

Switch to writing thumbnails as jpgs #1055

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Jan 22, 2025

This will hopefully reduce load time and server load.

This merge also changes the threshold on the aspect ratio of images at which images are considered "vertical" (and therefore given substantially taller thumbnails). Before, the threshold was 1, meaning nearly square figures could end up with substantially larger or smaller size depending on tiny variations in width, which made galleries of squarish figures quite inconsistent. The threshold is now set to 0.75 (i.e. 3:4). Weird behavior could still be seen with figures near this aspect ratio but we don't currently have figures like that in our galleries. (There are technical and aesthetic reasons that it is necessary to specify a fixed height for horizontal and vertical figures, rather than, for example, constraining either the height or the width.)

Checklist

  • Testing comment in the PR documents testing used to verify the changes

xylar added 2 commits January 22, 2025 04:30
This will hopefully reduce load time and server load.
Transition at an aspect ratio of 1 was giving strange results
for approximately square figures.  Let's try 0.75.
@xylar
Copy link
Collaborator Author

xylar commented Jan 22, 2025

Testing

I successfully ran the test suite on Chrysalis with this branch:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/analysis_testing/chrysalis/switch-thumbnails-to-jpg/

To my eye, the thumbnails now look right in both the main_py3.11 and the main_vs_ctrl galleries.

Load times do seem substantially faster.

@xylar xylar merged commit 7b0b1af into MPAS-Dev:develop Jan 22, 2025
5 checks passed
@xylar xylar deleted the switch-thumbnails-to-jpg branch January 22, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant