[GTK][WPE] Support JPEG 2000 images
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2019 10:02:33 +0000 (10:02 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2019 10:02:33 +0000 (10:02 +0000)
commit71fb5dfc5887b9cfc8f8c90ca11ba4633270a8eb
tree2fe9ab9375b603ee6a7eaea3f5ffc672b95191a6
parentdf0739176956927c593365a586d36dc1cdab60bc
[GTK][WPE] Support JPEG 2000 images
https://bugs.webkit.org/show_bug.cgi?id=186272

Reviewed by Žan Doberšek.

.:

Add USE_OPENJPEG build option.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Add JPEG2000ImageDecoder to support JPEG2000 images using OpenJPEG. For now only SRGB and SYCC color spaces are
supported.

* platform/ImageDecoders.cmake:
* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::supportedImageMIMETypes):
* platform/image-decoders/ScalableImageDecoder.cpp:
(WebCore::ScalableImageDecoder::create):
* platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp: Added.
(WebCore::syccToRGB):
(WebCore::sycc444ToRGB):
(WebCore::sycc422ToRGB):
(WebCore::sycc420ToRGB):
(WebCore::JPEG2000ImageDecoder::JPEG2000ImageDecoder):
(WebCore::JPEG2000ImageDecoder::frameBufferAtIndex):
(WebCore::JPEG2000ImageDecoder::decode):
* platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.h: Added.

Tools:

Add OpenJPEG to jhbuild since 2.2.0 version is required and it's not available in debian stable.

* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/ImageDecoders.cmake
Source/WebCore/platform/MIMETypeRegistry.cpp
Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
Source/WebCore/platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp [new file with mode: 0644]
Source/WebCore/platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.h [new file with mode: 0644]
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsWPE.cmake
Tools/ChangeLog
Tools/gtk/jhbuild.modules
Tools/wpe/jhbuild.modules