Issue 537 in webp: Feature request: different qualities for different sections of picture

6 views
Skip to first unread message

steve… via monorail

unread,
Aug 10, 2021, 9:57:21 PMAug 10
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 537 by steve...@gmail.com: Feature request: different qualities for different sections of picture
https://bugs.chromium.org/p/webp/issues/detail?id=537

Would like to have an option to apply different qualities to different sections of the picture.
For example, a picture that is 1920x1080, pixels x,y=0,0 start at top left like ffmpeg or Paint:

cwebp picture.png -q 100 -Q 60,x,0,200,y,0,1080 -Q 15,x,200,1920,y,0,400 -o out.webp

That would create out.webp with 100 quality except two rectangles, one with quality 60 and another 15:

|--------------------------------------------------------------------------------
| | |
| | |
| | |
| | q=15 |
| | |
| | |
| | |
| |_______________________________________________________________________|
| q=60 | |
| | |
| | |
| | |
| | |
| | q=100 |
| | |
| | |
| | |
| | |
|________|_______________________________________________________________________|
<--------------------------------------- 1920 ----------------------------------->

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

steve… via monorail

unread,
Aug 10, 2021, 10:00:13 PMAug 10
to webp-d...@webmproject.org

Comment #1 on issue 537 by steve...@gmail.com: Feature request: different qualities for different sections of picture
https://bugs.chromium.org/p/webp/issues/detail?id=537#c1

(No comment was entered for this change.)

Attachments:
sample.png 4.1 KB

pasca… via monorail

unread,
Aug 18, 2021, 7:23:57 AMAug 18
to webp-d...@webmproject.org
Updates:
Owner: pasca...@gmail.com
Status: Started

Comment #2 on issue 537 by pasca...@gmail.com: Feature request: different qualities for different sections of picture
https://bugs.chromium.org/p/webp/issues/detail?id=537#c2

Hi,

Thanks for the request.

Actually, i had some (unfinalized) code going in the direction of the feature you need:
see patch https://chromium-review.googlesource.com/c/webm/libwebp/+/2637273

You'll have to write some custom ad-hoc code to get the partitioning you expect (see cwebp.c:520),
but it might work...

Curious to hear if you find this approach fitting your needs!

steve… via monorail

unread,
Aug 18, 2021, 9:57:40 AMAug 18
to webp-d...@webmproject.org

Comment #3 on issue 537 by steve...@gmail.com: Feature request: different qualities for different sections of picture
https://bugs.chromium.org/p/webp/issues/detail?id=537#c3

I'll wait to have a working build that can test myself.
Reply all
Reply to author
Forward
0 new messages