MacDue
4c15c87d0c
LibGfx/TinyVG: Fix decoding green channel of graphics RGB565 colors
...
The division was missed here, so this would produce overly bright greens
(or overflow).
2024-03-12 21:53:23 +00:00
MacDue
633f0067c1
LibGfx: Remove suspicious const&
in TinyVGLoader
...
`decode_color_table()` returns a vector by value (not reference), so
assigning it to a const reference (while legal), seems odd.
2024-03-12 21:53:23 +00:00
Tim Ledbetter
10757b7787
LibGfx/TinyVG: Clamp RGBAF32 color values from 0 and 255
2023-12-02 10:47:39 +01:00
Tim Ledbetter
aa54007943
LibGfx/TinyVG: Avoid OOM if header contains a bogus color table size
...
This change limits the amount of memory that is initially allocated for
the color table. This prevents an OOM condition if the file contains an
incorrect color table size.
2023-12-02 10:47:39 +01:00
Tim Ledbetter
0b824ab7a6
LibGfx: Check bounds of color table access in TinyVGLoader
2023-10-03 22:59:38 +01:00
Lucas CHOLLET
35dcd16ea6
LibGfx/TinyVG: Decode the header in create()
and remove initialize()
...
This is done as a part of #19893 .
2023-07-16 20:39:51 +02:00
MacDue
cf05da131f
LibGfx/TinyVG: Close polygon path in OutlineFillPolygon
2023-07-15 21:36:28 +02:00
MacDue
a853f7b133
LibGfx/TinyVG: Map gradients to equivalent SVG gradients
2023-07-15 21:36:28 +02:00
MacDue
fb61082a6c
LibGfx/TinyVG: Don't move fill/stroke styles that are used in a loop
2023-07-15 21:36:28 +02:00
MacDue
bebfb81c85
LibGfx/TinyVG: Parse and ignore line_width
in paths
...
TinyVG allows varying the line width along a path, this is not supported
in LibGfx so we just ignore this (but still need to parse the field).
2023-07-15 21:36:28 +02:00
MacDue
57c81c1719
LibGfx: Lazily load TinyVG image data
...
This matches the behavior of other decoders, and ensures just getting
the size (e.g. for the `file` command) does not read the whole file.
2023-07-14 06:51:05 +02:00
MacDue
753cf04be8
LibGfx: Allow requesting vector graphic frames from ImageDecoder
...
Only supported for plugins that set is_vector() to true. This returns
the frames as Gfx::VectorGraphics, which allows painting/rasterizing
them with arbitrary transforms and scales.
2023-07-14 06:51:05 +02: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
ae18186905
LibGfx: Implement image decoder for TinyVG (.tvg)
...
This adds a decoder for the TinyVG vector format (https://tinyvg.tech/ ).
TinyVG is a very simple binary vector format, but it is good enough to
represent a lot of SVGs, without needing the full web engine.
The main use case for Serenity is for scalable icons (which .tvg easily
handles).
2023-07-03 23:54:51 +02:00