Lucas CHOLLET
24087ef6eb
LibGfx: Return true from PortableImageDecoderPlugin::initialize()
...
Reading the two magic bytes are always done in `decode()` by calling
`read_magic_number()`. So no need to read it twice.
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
4554d10fe5
LibGfx: Remove unused functions load_from_memory
and load_impl
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
05e6ed6ecb
LibGfx/PortableFormat: Propagate errors from some read_*
functions
...
These functions are:
- read_width
- read_height
- read_max_val
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
bab2113ec1
LibGfx/PortableFormat: Make read_whitespace
return an ErrorOr
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
74f893e9f4
LibGfx/PortableFormat: Make read_comment
return an ErrorOr
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
964172754e
LibGfx/PortableFormat: Don't accept comments that don't start with #
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
9052a6febf
LibGfx/PortableFormat: Simplify read_number
signature
...
The function signature goes from:
`bool read_number(Streamer& streamer, TValue* value)`
to
`ErrorOr<u16> read_number(Streamer& streamer)`
It allows us to, on one hand use `ErrorOr` for error propagation,
removing an out parameter in the meantime, and on the other hand remove
the useless template.
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
387894cdf2
LibGfx: Make PortableImageDecoderPlugin
constructor private
2023-03-24 10:56:58 +01:00
Lucas CHOLLET
f66de973ff
LibGfx/JPEG: Replace a FIXME with some explanations
...
Calling the `ycbcr_to_rgb` function still looks unsuitable for this
usage, but it does the job correctly.
2023-03-22 08:57:51 +01:00
Lucas CHOLLET
496b7ffb2b
LibGfx: Move all image loaders and writers to a subdirectory
2023-03-21 22:39:25 +01:00