One problem with the WebP image format is that if you try to export an image that has very thin, sharp lines, specially red lines, they'll become blurry, and the bright red will become dark red. This is due to WebP's compression algorithm discarding red chroma information. Such high levels of red chroma aren't commonly found in photos, but it's very easy to create a diagram or infographic in Photoshop or Inkscape with bright red lines that end up looking worse than they would in JPEG. This is terrible because WebP is a great replacement for PNG, but you can't really use it if it produces such poor quality results. Fortunately, there is a way to fix this, and export as WebP in a way that preserves the red chroma.
To do this, we need to use the WebP's library flag sharp_yuv
, which means we need an application that lets use set that option through a GUI. This option is available in GIMP, but only in version 2.99, which is unstable. It will be available in GIMP 3.0 when it gets released (I've been waiting for that for 6 months now). It isn't available in GIMP 2.10, so you need to download the unstable version of GIMP to use it.
When you export as WebP through GIMP 2.99, you'll have in the export dialog a checkbox for "Sharp YUV." Checking it uses a different algorithm to compress the image that produces less blurry results. It's not perfect, but it's a vast improvement over the default algorithm.
Observations
Useless Setting?: I expected changing the "Source type" in GIMP from Default to Icon or Text to solve the blurriness problem, but it doesn't seem to do anything at all. I'm not quite sure what this setting is for, honestly.
Leave a Reply