[Added] WebP: Is lossy or lossless shall be shown in Image "tab" (in Browser and Info Window)

Want to submit a new feature, an enhancement ? Do it here !
Post Reply
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

[Added] WebP: Is lossy or lossless shall be shown in Image "tab" (in Browser and Info Window)

Post by porg »

User Story: For PNGs one knows they are lossless, for JPG one knows they are lossy. For WebP one is in doubt.

Info: The command line utility webpinfo can tell you whether a WebP is lossy or lossless.

Code: Select all

$ webpinfo Axure-Prototyping-1-toc-state.webp

RIFF HEADER:
  File size:  38740
Chunk VP8X at offset     12, length     18
  ICCP: 0
  Alpha: 1
  EXIF: 0
  XMP: 0
  Animation: 0
  Canvas size 2880 x 1750
Chunk VP8L at offset     30, length  38576
  Width: 2880
  Height: 1750
  Alpha: 1
  Animation: 0
  Format: Lossless (2) 👈 Here is the info whether the WebP is "Lossless (2)" or "Lossy (1)"
No error detected.
There were 1 warning(s).
Proposal: GraphicConverter's Image tab in Info Window of Editor or Info Pane in Browser gets inserted new attribute "Lossless".


File Format: WebP
File Length: 140 KB
Lossless: Yes
Compression: 1:20



File Format: WebP
File Length: 280 KB
Lossless: No
Compression: 1:40


Alternative Proposal: More capable attribute "Quality" with values: Lossless, Lossy, and if lossy and the encoder's quality setting can be determined, state that in brackets.

File Format: WebP
File Length: 140 KB
Quality: Lossless
Compression: 1:52

File Format: JPEG
File Length: 350 KB
Quality: Lossy
Compression: 1:9

File Format: JPEG
File Length: 350 KB
Quality: Lossy (q=80, found in <AttributeX>)
Compression: 1:12
Last edited by porg on Thu Dec 08, 2022 9:54 pm, edited 2 times in total.
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: WebP: Is lossyor lossless shall be shown in Image "tab" (in Browser and Info Window)

Post by porg »

How to determining image compression quality in the lossy image file?

1) Some encoders put that information somewhere in EXIF

e.g. I encountered a JPG whose ExifTool evaluation shows the encoding software and used quality

Code: Select all

---- File ----
Comment: CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 95.
2) And ImageMagick's identify command can determine quality of lossy compressed images too.

I assume that's an heuristic estimation that works for all files (also those with minimal or no metadata at all)

Code: Select all

identify -format '%Q' your-image.ext
Returns the image compression quality. Tried it myself for one JPG and got a number.
Did not check it systematically (e.g. Export JPG in GC with certain quality and then evaluate with identify, then with other quality, evaluate, then other file type at certain quality, evaluate again, etc…)
For now it's only an idea. Waiting for your input on it.

Sources:
-format argument
Single Letter Attribute Percent Escape %Q as in image compression quality ( 0 = default )
User avatar
forum_adm
Site Admin
Posts: 1818
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: WebP: Is lossy or lossless shall be shown in Image "tab" (in Browser and Info Window)

Post by forum_adm »

Build 5691 will display lossy/lossless.

The quality of JPEGs is already displayed.
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: [Added] WebP: Is lossy or lossless shall be shown in Image "tab" (in Browser and Info Window)

Post by porg »

Closing as [Added]
- Tested 11.7.1 (build 5691)
- "Image" tab in Info Window of Editor and Info Panel of browser now both show
- File Format: WebP (lossless)
- File Format: WebP (lossy)
- Depending what's the case.
- Thanks for adding this!
Post Reply