Re: [weewx-user] WeeWX WebP image plots should they be an option?

37 views
Skip to first unread message

Tom Keffer

unread,
Mar 4, 2022, 5:57:20 PM3/4/22
to weewx-user
I like this idea. 

I've created issue #758  to look into allowing user-selectable formats. 

On Fri, Mar 4, 2022 at 2:45 PM pa...@pauland.net <pa...@pauland.net> wrote:

What is WebP

WebP is an image file format that Google developed in 2010

Google Says:

"WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster"

Sounds great but the web has been slow to support WebP images in desktop and mobile browsers. At this point in 2022 according to data at https://caniuse.com/webp about 95% of user devices support it.

So I decided to try to have WeeWX produce all plot images in WebP format rather than png. Results were impressive, image size was reduced by roughly 50% , and I can't see any noticeably difference in image quality.

Switched my website to all WebP  images a few days ago, and no ones complaining, but it doesn’t get much traffic.

Would really appreciate it if you take a look at my site , and let me know if you have difficulties viewing the images, and your comments on image quality.

https://pauland.net

Thanks,

Paul

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/cf52ee8e-65a1-403b-8d4d-dde3670403d8n%40googlegroups.com.

Paul R Anderson

unread,
Mar 4, 2022, 8:01:42 PM3/4/22
to weewx...@googlegroups.com
Hi Tom,
Glad you like the idea. Really impressed with the file size and image quality using WebP.
Only had to hack two changes to imagegenerator.py
Change hard coded  '%s.png'  'to  '%s.webp'
And because I needed to pass in a option
                        # Now save the image
                        image.save(img_file,lossless = True)
                        ngen += 1   
Sorry for duplicate messages, sometimes google groups hates me and blocks my post :)  

Thanks,
Paul   







Reply all
Reply to author
Forward
0 new messages