Skip to content

image/webp #13

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

Merged
merged 1 commit into from
Jul 21, 2023
Merged

image/webp #13

merged 1 commit into from
Jul 21, 2023

Conversation

motiejus
Copy link
Contributor

@motiejus motiejus commented Jun 4, 2023

support image/webp

Refs openstreetmap/mod_tile#318

@motiejus
Copy link
Contributor Author

motiejus commented Jun 4, 2023

Hm, there seems to be a footgun: renderd will return only the image that was configured, and it accepts only a single image format. So it is invalid to ask for both .png and .webp - the payload will be of the type in the renderd config:

motiejus@fwmine:~$ wget http://localhost:8080/tile/19/298976/166646.png
--2023-06-05 01:48:02--  http://localhost:8080/tile/19/298976/166646.png
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9032 (8.8K) [image/png]
Saving to: ‘166646.png’

166646.png                              100%[==============================================================================>]   8.82K  --.-KB/s    in 0s      

2023-06-05 01:48:02 (228 MB/s) - ‘166646.png’ saved [9032/9032]

motiejus@fwmine:~$ wget http://localhost:8080/tile/19/298976/166646.webp
--2023-06-05 01:48:05--  http://localhost:8080/tile/19/298976/166646.webp
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9032 (8.8K) [image/webp]
Saving to: ‘166646.webp’

166646.webp                             100%[==============================================================================>]   8.82K  --.-KB/s    in 0s      

2023-06-05 01:48:05 (210 MB/s) - ‘166646.webp’ saved [9032/9032]

motiejus@fwmine:~$ file 166646.*
166646.png:  RIFF (little-endian) data, Web/P image
166646.webp: RIFF (little-endian) data, Web/P image
motiejus@fwmine:~$ ls -l 166646.*
-rw-r--r-- 1 motiejus motiejus 9032 Jun  5 01:13 166646.png
-rw-r--r-- 1 motiejus motiejus 9032 Jun  5 01:13 166646.webp

@nielsole
Copy link
Owner

nielsole commented Jun 5, 2023

probably makes sense to wait for openstreetmap/mod_tile#318 to be merged, right?

@motiejus motiejus marked this pull request as draft June 5, 2023 07:28
@motiejus
Copy link
Contributor Author

motiejus commented Jun 5, 2023

probably makes sense to wait for openstreetmap/mod_tile#318 to be merged, right?

Indeed, correct. Converted to draft.

@hummeltech
Copy link
Contributor

Alright, that PR has been merged.

@nielsole
Copy link
Owner

motiejus, do you want to change anything or merge as is?

@motiejus
Copy link
Contributor Author

motiejus, do you want to change anything or merge as is?

I am not proud of it, as it makes truly minimal adjustments to make webp possible. But it's not horrible, so we can land it.

@nielsole nielsole marked this pull request as ready for review July 21, 2023 18:25
@nielsole nielsole merged commit dfcfe50 into nielsole:master Jul 21, 2023
@motiejus motiejus deleted the webp branch August 27, 2023 12:52
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.

3 participants