Skip to content

image/webp - #13

Merged
nielsole merged 1 commit into
nielsole:masterfrom
motiejus:webp
Jul 21, 2023
Merged

image/webp#13
nielsole merged 1 commit into
nielsole:masterfrom
motiejus:webp

Conversation

@motiejus

@motiejus motiejus commented Jun 4, 2023

Copy link
Copy Markdown
Contributor

support image/webp

Refs openstreetmap/mod_tile#318

@motiejus

motiejus commented Jun 4, 2023

Copy link
Copy Markdown
Contributor Author

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

nielsole commented Jun 5, 2023

Copy link
Copy Markdown
Owner

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

motiejus commented Jun 5, 2023

Copy link
Copy Markdown
Contributor Author

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

Indeed, correct. Converted to draft.

@hummeltech

Copy link
Copy Markdown
Contributor

Alright, that PR has been merged.

@nielsole

Copy link
Copy Markdown
Owner

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

@motiejus

Copy link
Copy Markdown
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