1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00
serenity/Userland/Libraries/LibGfx/ImageFormats
Lucas CHOLLET b8cbc282f3 LibGfx/TIFF: Don't stop decoding when failing to decode a tag
TIFF files are made in a way that make them easily extendable and over
the years people have made sure to exploit that. In other words, it's
easy to find images with non-standard tags. Instead of returning an
error for that, let's skip them.

Note that we need to make sure to realign the reading head in the file.

The test case was originally a 10x10 checkerboard image with required
tags, and also the `DocumentName` tag. Then, I modified this tag in a
hexadecimal editor and replaced its id with 30 000 (0x3075 as a LE u16)
and the type with the same value as well. This is AFAIK, never used as
a custom TIFF tag, so this should remain an invalid tag id and type.
2024-01-04 14:27:16 +01:00
..
ISOBMFF LibGfx: Misc 32-bit build fixes 2023-09-06 07:21:07 -06:00
BMPLoader.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
BMPLoader.h LibGfx: Provide a default implementation for animation-related methods 2023-07-18 14:34:35 +01:00
BMPWriter.cpp
BMPWriter.h
BooleanDecoder.cpp LibGfx/LibVideo: Check for overreads only at end of a VPX range decode 2023-06-10 07:17:12 +02:00
BooleanDecoder.h LibGfx/LibVideo: Check for overreads only at end of a VPX range decode 2023-06-10 07:17:12 +02:00
CCITTDecoder.cpp LibGfx/TIFF: Add support for images with CCITT3 1D compression 2023-12-19 21:01:24 +01:00
CCITTDecoder.h LibGfx/TIFF: Add support for images with CCITT3 1D compression 2023-12-19 21:01:24 +01:00
DDSLoader.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
DDSLoader.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
ExifOrientedBitmap.h LibGfx: Add ExifOrientedBitmap 2023-08-09 13:18:40 +01:00
GIFLoader.cpp LibGfx/GIF: Use LZWDecoder::decode_all() 2023-12-01 12:58:14 +01:00
GIFLoader.h LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
ICOLoader.cpp AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
ICOLoader.h LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
ILBMLoader.cpp LibGfx+LibPDF: Use LibCompress' implementation of the PackBits decoder 2023-12-27 17:40:11 +01:00
ILBMLoader.h LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
ImageDecoder.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ImageDecoder.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JPEGLoader.cpp LibGfx/JPEG: Reject ycck or cmyk jpegs with k subsampled for now 2023-12-29 18:55:57 +01:00
JPEGLoader.h LibPDF+LibGfx: Don't invert CMYK channels in JPEG data in PDFs 2023-11-17 22:32:40 +00:00
JPEGShared.h LibGfx/JPEG: Put generic definitions in a shared header 2023-06-22 21:13:04 +02:00
JPEGWriter.cpp LibGfx/JPEGWriter: Fix crash on macOS when csize coefficient is 0 2023-11-09 16:07:28 +01:00
JPEGWriter.h LibGfx/JPEG: Take the quality as an argument instead of hardcoding it 2023-07-04 00:01:06 +02:00
JPEGWriterTables.h LibGfx/JPEG: Add a JPEG encoder :^) 2023-06-22 21:13:04 +02:00
JPEGXLLoader.cpp LibGfx: Misc 32-bit build fixes 2023-09-06 07:21:07 -06:00
JPEGXLLoader.h LibGfx/JPEGXL: Add a JPEG-XL decoder :^) 2023-07-21 10:47:34 -06:00
PBMLoader.cpp LibGfx/PortableFormat: Simplify the State enum 2023-07-11 14:16:33 +01:00
PBMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PGMLoader.cpp LibGfx/PortableFormat: Simplify the State enum 2023-07-11 14:16:33 +01:00
PGMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PNGLoader.cpp LibGfx: Allow passing FilterType::None to unfilter_scanline() 2023-11-17 19:09:50 +01:00
PNGLoader.h LibGfx: Make unfilter_scanline() a static PNGImageDecoderPlugin method 2023-11-17 19:09:50 +01:00
PNGShared.h LibGfx+LibPDF: Create filter_type() for converting u8 to FilterType 2023-11-17 19:09:50 +01:00
PNGWriter.cpp Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
PNGWriter.h
PortableFormatWriter.cpp LibGfx/PortableFormat: Use FixedArray::unchecked_at 2023-05-09 11:18:46 +02:00
PortableFormatWriter.h LibGfx/PortableFormat+image: Make encode take a Stream 2023-05-09 11:18:46 +02:00
PortableImageLoaderCommon.h LibGfx: Remove maximum size limit for decoded images 2023-09-03 14:36:54 +02:00
PortableImageMapLoader.h LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
PPMLoader.cpp LibGfx/PortableFormat: Simplify the State enum 2023-07-11 14:16:33 +01:00
PPMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
QOILoader.cpp LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
QOILoader.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
QOIWriter.cpp Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
QOIWriter.h
TGALoader.cpp AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
TGALoader.h LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
TIFFLoader.cpp LibGfx/TIFF: Don't stop decoding when failing to decode a tag 2024-01-04 14:27:16 +01:00
TIFFLoader.h LibGfx/TIFF: Add support for the ICCProfile tag 2023-12-02 10:36:02 +01:00
TinyVGLoader.cpp LibGfx/TinyVG: Clamp RGBAF32 color values from 0 and 255 2023-12-02 10:47:39 +01:00
TinyVGLoader.h LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
WebPLoader.cpp LibGfx: Move FourCC to its own file 2023-11-24 08:42:46 +01:00
WebPLoader.h LibGfx/WebP: Decode the first chunk in create() 2023-07-15 09:34:07 +02:00
WebPLoaderLossless.cpp AK: Reject BitStream reads beyond EOF by default 2023-12-01 12:48:18 +01:00
WebPLoaderLossless.h LibGfx/WebP: Minor cosmetical changes in WebPLoaderLossless.h 2023-05-09 06:35:56 +02:00
WebPLoaderLossy.cpp LibGfx/LibVideo: Check for overreads only at end of a VPX range decode 2023-06-10 07:17:12 +02:00
WebPLoaderLossy.h WebP/Lossy: Implement macroblock coefficient decoding 2023-05-29 10:41:53 -06:00
WebPLoaderLossyTables.h WebP/Lossy: Add const annotations to functions in Tables.h 2023-06-01 16:23:46 +02:00