Ali Mohammad Pur
5e1499d104
Everywhere: Rename {Deprecated => Byte}String
...
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).
This commit is auto-generated:
$ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
Meta Ports Ladybird Tests Kernel)
$ perl -pie 's/\bDeprecatedString\b/ByteString/g;
s/deprecated_string/byte_string/g' $xs
$ clang-format --style=file -i \
$(git diff --name-only | grep \.cpp\|\.h)
$ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
Lucas CHOLLET
e721c74598
LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data()
2023-10-29 07:21:10 +00:00
Tim Ledbetter
1abc52a689
LibGfx/DDSLoader: Avoid integer overflow in decode_color_block()
2023-10-06 22:18:27 +02:00
Tim Ledbetter
b25efa219b
LibGfx/DDSLoader: Allow image dimensions that are not divisible by 4
2023-10-06 22:18:27 +02:00
Lucas CHOLLET
806808f406
LibGfx: Provide a default implementation for animation-related methods
...
Most image decoders that we have only support non-animated images,
providing a default implementation for them allows to remove quite some
code.
2023-07-18 14:34:35 +01:00
Lucas CHOLLET
0520490577
LibGfx/DDS: Read the header in create()
and remove initialize()
...
This is done as a part of #19893 .
2023-07-17 06:44:37 +01:00
Lucas CHOLLET
aa9470880f
LibGfx/DDS: Prefer static constexpr Array
over Vector<u32>
2023-07-17 06:44:37 +01:00
Lucas CHOLLET
742897519d
LibGfx/DDS: Move the code to read the header in its own function
2023-07-17 06:44:37 +01:00
Lucas CHOLLET
76efdaeecd
LibGfx/DDS: Save the format in the context
...
This allows us to simplify the signature of a few functions.
2023-07-17 06:44:37 +01:00
Lucas CHOLLET
4cb7573582
LibGfx/DDS: Only use a FixedMemoryStream
...
This allows us to drop the data pointer in the `DDSLoadingContext`.
2023-07-17 06:44:37 +01:00
Lucas CHOLLET
8946c0c104
LibGfx/DDS: Don't double-check the magic number
...
This is already done in `decode_dds()`.
2023-07-17 06:44:37 +01:00
Lucas CHOLLET
e5b70837de
LibGfx: Remove ImageDecoder::set_[non]volatile()
...
These methods are unused so let's remove them.
2023-07-08 01:45:46 +01:00
MacDue
e7cddda7e1
LibGfx: Allow passing an ideal size to image decoders
...
The ideal size is the size the user will display the image. Raster
formats should ignore this parameter, but vector formats can use
it to generate a bitmap of the ideal size.
2023-07-03 23:54:51 +02:00
Ben Wiederhake
da394abe04
LibGfx+Fuzz: Convert ImageDecoder::initialize to ErrorOr
...
This prevents callers from accidentally discarding the result of
initialize(), which was the root cause of this OSS Fuzz bug:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary
2023-05-12 09:40:24 +01:00
Tom
e7921cfe14
LibGfx: Add first_animated_frame_index method to ImageDecoder
...
Some image formats such as APNG may not use the first frame for
animations.
2023-05-05 15:20:44 +01:00
Ben Wiederhake
560133a0c6
Everywhere: Remove unused DeprecatedString includes
2023-04-09 22:00:54 +02:00
Lucas CHOLLET
496b7ffb2b
LibGfx: Move all image loaders and writers to a subdirectory
2023-03-21 22:39:25 +01:00