Skip to content

Commit

Permalink
LibGfx/JPEG2000: Add a simple JPEG2000 test image
Browse files Browse the repository at this point in the history
I drew this in Acorn.app and used "Save as..." to save it as JPEG2000.
It's an RGBA image.
  • Loading branch information
nico committed Mar 23, 2024
1 parent 50a16d4 commit aa1a8fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Binary file added Tests/LibGfx/test-inputs/jpeg2000/simple.jp2
Binary file not shown.
3 changes: 1 addition & 2 deletions Userland/Libraries/LibGfx/ImageFormats/JPEG2000Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

#include <AK/MemoryStream.h>
#include <LibGfx/ImageFormats/JPEG2000Loader.h>
#include <LibGfx/ImageFormats/ISOBMFF/JPEG2000Boxes.h>
#include <LibGfx/ImageFormats/ISOBMFF/Reader.h>
#include <LibGfx/ImageFormats/JPEG2000Loader.h>

// Core coding syste spec (.jp2 format): T-REC-T.800-201511-S!!PDF-E.pdf available here:
// https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-T.800-201511-S!!PDF-E&type=items
Expand Down Expand Up @@ -162,7 +162,6 @@ ErrorOr<ImageFrameDescriptor> JPEG2000ImageDecoderPlugin::frame(size_t index, Op
return Error::from_string_literal("JPEG2000ImageDecoderPlugin: Draw the rest of the owl");
}


ErrorOr<Optional<ReadonlyBytes>> JPEG2000ImageDecoderPlugin::icc_data()
{
if (m_context->icc_data.has_value())
Expand Down

0 comments on commit aa1a8fc

Please sign in to comment.