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

Add a setting to force image output format #360

Merged
merged 2 commits into from Mar 16, 2020
Merged

Add a setting to force image output format #360

merged 2 commits into from Mar 16, 2020

Conversation

kdm9
Copy link
Contributor

@kdm9 kdm9 commented Feb 3, 2019

It seems that sigal uses the format of input images for each output image. This new setting allows one to hard-code the output format of all images in the settings.conf.py.

My use case: I develop images to tiffs, and many browsers dont' like tiffs it seems. Now I can force JPEG output for all images, and browsers are happy to display them.

Thanks,
Kevin

@codecov
Copy link

codecov bot commented Feb 3, 2019

Codecov Report

Merging #360 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #360   +/-   ##
=======================================
  Coverage   87.41%   87.41%           
=======================================
  Files          18       18           
  Lines        1438     1438           
=======================================
  Hits         1257     1257           
  Misses        181      181
Impacted Files Coverage Δ
sigal/settings.py 97.87% <ø> (ø) ⬆️
sigal/image.py 92.22% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9193856...232f996. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 3, 2019

Codecov Report

Merging #360 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #360      +/-   ##
==========================================
+ Coverage   87.42%   87.49%   +0.06%     
==========================================
  Files          19       19              
  Lines        1503     1503              
==========================================
+ Hits         1314     1315       +1     
+ Misses        189      188       -1
Impacted Files Coverage Δ
sigal/settings.py 97.87% <ø> (ø) ⬆️
sigal/image.py 92.22% <100%> (ø) ⬆️
sigal/plugins/watermark.py 88.37% <0%> (+2.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b29e479...0f226ae. Read the comment docs.

@kdm9
Copy link
Contributor Author

kdm9 commented Feb 3, 2019

(WORK IN PROGRESS)

@@ -40,6 +40,9 @@
# Size of resized image (default: (640, 480))
img_size = (800, 600)

# Output format of images (default: None, i.e. use input format)
img_format = "JPEG"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be commented as this file is meant to be used with the default values when creating a new gallery. Could you also add in the comment a list of possible values for the most common formats (e.g. png) ?

@saimn
Copy link
Owner

saimn commented Feb 8, 2019

Thanks, this can indeed be useful. If you can address my comment then I think it is good to go ?

@saimn saimn merged commit 97b6808 into saimn:master Mar 16, 2020
@saimn
Copy link
Owner

saimn commented Mar 16, 2020

Thanks!

kontza pushed a commit to kontza/sigal that referenced this pull request Aug 28, 2020
Add a setting to force image output format
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

Successfully merging this pull request may close these issues.

None yet

2 participants