Re: Replacing the animal photos in the ‘erase’ activities
Timothée Giet
animtim at gmail.com
Mon Feb 21 19:21:15 GMT 2022
Thanks Karl for sharing those test results.
About the loss of details with webp in the dark parts of the second
image, this is not a big problem, as a rule of thumb in photo/visual
art/digital painting/..., it's less important to have details in the
dark parts as the eye is naturally more attracted by the details in
light areas.
Knowing already the compression power and quality of webp, I'm sure we
can even target a smaller average size similar to current image set, if
we use optimal settings of webp encoding that can reduce file size.
About target-size vs quality options, I agree that we should use quality
more than target-size to get smaller size where possible and a bit
bigger size where really needed.
Timothée
Le 21/02/2022 à 19:55, Karl Ove Hufthammer a écrit :
> Karl Ove Hufthammer skreiv 20.02.2022 18:24:
>>
>>> But first thing before moving to it, is to make sure we can package it
>>> and make it work fine for all our supported platforms.
>>
>> I hope it does. I have tested WebP on a few images, and while very
>> high compression levels (of course) did result in visible artefacts,
>> these artefacts were much less *annoying* than the corresponding JPEG
>> artefacts. So with WebP we can probably use both high resolution and
>> higher compression.
>
> Here are a couple of example images to illustrate this. The file size
> of the animal images in GCompris range from 220 KiB to 38 KiB (the
> latter being a *very* low-quality image). If we use a target file size
> of 150 KiB, we will be able to include ~35 images.
>
> My first example image is this cheetah:
> https://commons.wikimedia.org/wiki/File:Cheetah_(Acinonyx_jubatus)_female_2.jpg
>
> After cropping, resizing to 1920 × 1080 and subtle sharpening, it
> looks like this in full quality (~2 MiB):
> https://huftis.org/kritikk/gcompris/cheetah-original.jpg
> (If viewing in a browser, remember to click to zoom in and see it in
> full resolution.)
>
> The ~150 KiB JPEG shows ugly banding/posterisation in the background:
> https://huftis.org/kritikk/gcompris/cheetah-jpeg-150.jpg
> (I used Gimp to save it, but a JPEG of similar size converted with
> ImageMagick corresponds to a -quality setting of < 20, i.e., very low
> quality.)
>
> The similarly-sized WebP has acceptable artefacts:
> https://huftis.org/kritikk/gcompris/cheetah-webp-150.webp
>
>
> Here are corresponding images for this horse image:
> https://upload.wikimedia.org/wikipedia/commons/f/fa/Zaniskari_Horse_in_Ladakh.jpg
>
> https://huftis.org/kritikk/gcompris/horse-original.jpg
> https://huftis.org/kritikk/gcompris/horse-jpeg-150.jpg
> https://huftis.org/kritikk/gcompris/horse-webp-150.webp
>
> Here I actually think the JPEG looks slightly better. The WebP version
> loses some details in the darker, front part of the horse. I wonder if
> this is a general problem with WebP, as you can see the same
> over-smoothing effect in the red eye of the cheetah.
>
> Also note that here I have used a target size of 150 KiB. But some
> images have more details, and will benefit from lower compression
> levels (higher file sizes), while some have fewer details, and can be
> reduced (perhaps much) more in file size without much loss of quality.
> I think it’s better to aim for a target *average* file size of, for
> example, 150 KiB and use the ‘-quality’/‘-q’ parameter when converting
> the images. Then every image should be of ~equal quality, while the
> file sizes will vary.
>
> --
> Karl Ove Hufthammer
More information about the GCompris-devel
mailing list