Commit Graph

7 Commits

Author SHA1 Message Date
TÖRÖK Attila ec462115ef core: nit: Use `strip_prefix` instead of `starts_with` and subslicing.
As suggested by relrelb in a review note for #8820.
2023-01-16 17:33:41 +01:00
Mike Welsh 9cd6849772 core: Append EOI marker to JPEG data when missing
Fixes #4209.
2023-01-16 03:03:28 +01:00
Mike Welsh cceb18910b core: Fix handling of invalid EOI+SOI marker in JPEG data (fix #8775)
Previously we were removing the first occurrence of the invalid
0xFFD9FFD8 byte sequence in JPEG data, but this would break the
JPEG if it happened to contain this byte sequence elsewhere (for
example, EXIF data). Instead, properly parse the JPEG markers
searching for the invalid marker sequence.

Fixes #8775.
2023-01-16 03:03:28 +01:00
relrelb c31e9e2b11 render: Random cleanups
Avoid some `Vec::with_capacity` and de-duplicate code.
2022-09-22 03:00:02 +03:00
= 03eb769a33 render: Made render use a real Error enum and not generic box<error> 2022-08-25 23:43:21 +02:00
Mike Welsh f72e02f4b2 core: Add unmultiply_alpha_rgba 2022-08-19 13:35:07 -07:00
Nathan Adams 9fd8fd938e render: Moved render utils from core to render 2022-08-14 18:38:14 -07:00