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

Configurable ImageIO output format #318

Merged

Conversation

hummeltech
Copy link
Collaborator

@hummeltech hummeltech commented Jun 4, 2023

Replaces #191 (thanks @timautin!) as it has been inactive for @ 2.3 years:

Added the possibility to provide ImageIO's output format in the TYPE string of the renderd.conf file.
For instance:
TYPE=png image/png
TYPE=png image/png png256
TYPE=png image/png png24
TYPE=png image/png png

This should be backward compatible with existing renderd.conf files.

Also added additional tests for various image output formats:

  • jpeg
    • TYPE=jpg image/jpeg jpeg
  • png256
    • TYPE=png image/png png256
  • png32
    • TYPE=png image/png png32
  • webp
    • TYPE=webp image/webp webp

Closes #64
Closes #301

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Flawfinder found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@hummeltech
Copy link
Collaborator Author

Alright @motiejus, let me know if this works for you. Thanks!

@motiejus
Copy link

motiejus commented Jun 4, 2023

It works wonderfully!

I use renderd with go_tile, PR there for webp: nielsole/go_tile#13

@motiejus
Copy link

motiejus commented Jun 4, 2023

Note the footgun described in nielsole/go_tile#13 (comment) : it will return only the image that has been configured.

I will use both webp and png256, but these will be under different renderd maps. It would be useful to document it.

Ah, it is documented and is status quo already. Nevermind!

@hummeltech hummeltech force-pushed the feature-configurableOutputFormat branch from 5d7cfd1 to 517aab3 Compare July 20, 2023 14:58
@pantierra pantierra merged commit f652ab1 into openstreetmap:master Jul 20, 2023
1 check failed
@hummeltech hummeltech deleted the feature-configurableOutputFormat branch July 20, 2023 22:24
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.

Unable to generate webp tiles 32-bit instead of 8-bit PNG output
4 participants