Closed Bug 1750475 Opened 3 years ago Closed 3 years ago

support quality parameter for webp encoding via canvas (toBlob, toDataURL)

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(1 file)

Parsing the option coming from canvas was implemented in the webpencoder
https://searchfox.org/mozilla-central/rev/72c7cef167829b6f1e24cae216fa261934c455fc/image/encoders/webp/nsWebPEncoder.cpp#75
(looks like it's just a copy of the jpeg encoder code).

But canvas only passes through the quality value for jpeg

https://searchfox.org/mozilla-central/rev/72c7cef167829b6f1e24cae216fa261934c455fc/dom/canvas/CanvasRenderingContextHelper.cpp#264

As pointed out in https://bugzilla.mozilla.org/show_bug.cgi?id=1511670#c24

The necessary code was already there, just needed to allow it through.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/348b9c347231 Allow quality parameter to be passed through the webp encoder from canvas data url encoding functions. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: