aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images/SkImageEncoderPriv.h
Commit message (Collapse)AuthorAge
* Remove color space restrictions from image infosGravatar Brian Osman2018-06-04
| | | | | | | | | | | What makes an info valid (or invalid)? Nothing to do with color space. Bug: skia: Change-Id: I6795efa9aa74ab0d65935c5ddccc1058f8e0b112 Reviewed-on: https://skia-review.googlesource.com/131780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkEncoder: Rename files, change webp API, for consistencyGravatar Matt Sarett2017-05-05
| | | | | | | | Bug: skia: Change-Id: I3dd6feb3d5661dcad3d2388b4d01fa9d3bbb15bb Reviewed-on: https://skia-review.googlesource.com/15631 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for row-by-row png encodesGravatar Matt Sarett2017-05-05
| | | | | | | | | | Also adds a SkEncoder base class. Bug: 713862 Change-Id: Ia3f009cd9f376514f6c19396245fab3a43ae6536 Reviewed-on: https://skia-review.googlesource.com/15152 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for row-by-row jpeg encodingGravatar Matt Sarett2017-05-02
| | | | | | | | | | | Reland of: https://skia-review.googlesource.com/c/14641/ Bug: 713862 Change-Id: I9dca5ede4ebf569c5f80edcfb23a506b6cfa935e Reviewed-on: https://skia-review.googlesource.com/15144 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add support for row-by-row jpeg encoding"Gravatar Leon Scroggins2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9b848d5749c5e34b56f927a3a3374c8ebafbd9db. Reason for revert: ASAN reports leaked memory [1]. Google3 reports a "delete size mismatch" [2], which I suspect is the same issue. [1] https://chromium-swarm.appspot.com/task?id=35e2c9fa9eac6310&refresh=10&show_raw=1 [2] https://test.corp.google.com/ui#cl=154838904&flags=CAMQBQ==&id=OCL:154838904:BASE:154839043:1493741642370:9c96115f&t=//chrome/skia/dm_wrapper:dm_wrapper Original change's description: > Add support for row-by-row jpeg encoding > > Bug: 713862 > Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1 > Reviewed-on: https://skia-review.googlesource.com/14641 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > TBR=msarett@google.com,scroggo@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic5a8d67e0d4a7733662586055ceff086a2ab335d Reviewed-on: https://skia-review.googlesource.com/15140 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add support for row-by-row jpeg encodingGravatar Matt Sarett2017-05-02
| | | | | | | | Bug: 713862 Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1 Reviewed-on: https://skia-review.googlesource.com/14641 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add SkTransferFunctionBehavior flag: Use in codec and encoderGravatar Matt Sarett2017-03-24
| | | | | | | | | | | | | | This is a step towards removing the non-linear blending flag from SkColorSpace. The flag on SkColorSpace used to control the premul behavior - now it is controlled by this option. BUG=skia: Change-Id: Ia29bd8c2b0596a93c6aa14332dcd9bd39e388a90 Reviewed-on: https://skia-review.googlesource.com/10008 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for writing ICC profiles in png encodesGravatar Matt Sarett2017-03-21
| | | | | | | | | BUG=skia: Change-Id: I99eb2f157f249ed09d724461ec4a1e31db70816a Reviewed-on: https://skia-review.googlesource.com/9782 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Update SkJPEGImageEncoderGravatar Matt Sarett2017-01-28
| | | | | | | | | | | | | | (1) Use libjpeg-turbo color space extensions when possible. (2) Use transform_scanline_procs when pre-libjpeg-turbo transformation are required. (3) Add support for Gray and F16. BUG=skia: Change-Id: I77b977cb8c9e0afc17d907dd73a1cf3f16539bcc Reviewed-on: https://skia-review.googlesource.com/7642 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add F16 and gamma correct support to webp encoderGravatar Matt Sarett2017-01-24
| | | | | | | | | BUG=skia: Change-Id: Ib788466fa1e2bed26e7ffd8f03bee42930eae1d6 Reviewed-on: https://skia-review.googlesource.com/7425 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Respect SkColorSpace in SkPNGImageEncoderGravatar Matt Sarett2017-01-10
| | | | | | | | | | | | | | | | | | | | | | | This only changes behavior when the input SkBitmap/SkPixmap is tagged with a non-null SkColorSpace. Android tags their bitmaps as sRGB when linear blending is enabled. So this only changes behavior in Android when linear blending is turned on. *If linear blending is turned on, this will do a color correct encode (which is the desired behavior). *If linear blending is turned off, this will do a legacy encode. TODO: Add support for F16. TODO: Add color space support to WEBP. TODO: Tag encoded images with ICC profiles (when it makes sense). BUG=skia: Change-Id: Idd8a2836371d24a453d953e6fe2e76a87751be96 Reviewed-on: https://skia-review.googlesource.com/6498 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Remove SkKTXImageEncoderGravatar Leon Scroggins III2016-12-14
| | | | | | | | | | | | | | It escaped the chopping block when we deleted the decoder, but it is currently untested and unused as far as we know. In addition to removing effectively unsupported code, this simplifies build file changes (i.e. don't build it on Android framework, but build it elsewhere) as we narrow our build systems down to one. Change-Id: I3b960fdcc369fb947be282933ddba48e407ab3ad Reviewed-on: https://skia-review.googlesource.com/6031 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Do not build the ktx encoder for android framework"Gravatar Mike Klein2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eeb7137a0b421522de4c21c90fc3208e33e3a5a5. Reason for revert: well, duh, I guess we'd better update the GYP and Google3 builds... Original change's description: > Do not build the ktx encoder for android framework > > Move SkKTXImageEncoder.cpp into an optional block, and disable that > block for the android framework. Use a new define to determine whether > to define the entry point, rather than using > SK_BUILD_FOR_ANDROID_FRAMEWORK. > > Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1 > Reviewed-on: https://skia-review.googlesource.com/5982 > Commit-Queue: Leon Scroggins <scroggo@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I8da75db31884b5148f7f85a6a0c3e6913b71cfa8 Reviewed-on: https://skia-review.googlesource.com/6021 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Do not build the ktx encoder for android frameworkGravatar Leon Scroggins III2016-12-13
| | | | | | | | | | | | | Move SkKTXImageEncoder.cpp into an optional block, and disable that block for the android framework. Use a new define to determine whether to define the entry point, rather than using SK_BUILD_FOR_ANDROID_FRAMEWORK. Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1 Reviewed-on: https://skia-review.googlesource.com/5982 Commit-Queue: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* No SkEncodeImageAsKTX for ANDROID_FRAMEWORKGravatar Hal Canary2016-12-01
| | | | | | | | | | BUG=skia: Change-Id: Ia2925eb6aecd576d078256013fe122a468c30a5a Reviewed-on: https://skia-review.googlesource.com/5421 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkEncodeImage: no more link-time registrationGravatar Hal Canary2016-11-30
| | | | | | | | | | | | | | | Also, no more SkImageEncoder class. SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS now only guards some old API shims. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5006 Change-Id: I3797f584f3e8e12ade10d31e8733163453725f40 Reviewed-on: https://skia-review.googlesource.com/5006 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com>
* SkImageEncoder: simplify APIGravatar Hal Canary2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | (re-land 248ff02 & 2cb6cb7, with changes) - Hide SkImageEncoder class in private header. - SkImageEncoder::Type becomes SkEncodedImageFormat - SkEncodedFormat becomes SkEncodedImageFormat - SkImageEncoder static functions replaced with single function EncodeImage() - utility wrappers for EncodeImage() are in sk_tool_utils.h TODO: remove link-time registration mechanism. TODO: clean up clients use of API and flip the flag. TODO: implement EncodeImage() in chromeium/skia/ext Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0 Reviewed-on: https://skia-review.googlesource.com/4909 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-on: https://skia-review.googlesource.com/5186 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Revert 248ff023 & 2cb6cb72Gravatar Hal Canary2016-11-22
| | | | | | | | | | | | | | Revert "SkImageEncoder: simplify API" This reverts commit 248ff02331d7f73ee4b6c5a7eabeae1080c16cd4. Revert "Fix bug: can't convert nullptr -> bool" This reverts commit 2cb6cb7218171b357bb5c934f032ba69c7b78401. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151 NOTRY=true Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec Reviewed-on: https://skia-review.googlesource.com/5151 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* SkImageEncoder: simplify APIGravatar Hal Canary2016-11-22
- Hide SkImageEncoder class in private header. - SkImageEncoder::Type becomes SkEncodedImageFormat - SkEncodedFormat becomes SkEncodedImageFormat - SkImageEncoder static functions replaced with single function EncodeImage() - utility wrappers for EncodeImage() are in sk_tool_utils.h TODO: remove link-time registration mechanism. TODO: clean up clients use of API and flip the flag. TODO: implement EncodeImage() in chromeium/skia/ext GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4909 Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70 Reviewed-on: https://skia-review.googlesource.com/4909 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>