1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00
serenity/Userland/Libraries/LibGfx/ICC
Nico Weber a352099b05 LibGfx/ICC: In lerp_nd(), use VLAs for left_index, factor
`x.size()` is 3 or 4 in practice and at most 15 in theory
(cf `number_of_components_in_color_space()` in Profile.cpp),
so using a VLA for these should be fine from a stack size PoV.

They're accessed from two local loops iterating from 0 to
`x.size()`, so it's hopefully not too risky from a security
PoV either.

Takes

    Build/lagom/bin/image --no-output \
        --assign-color-profile \
            Build/lagom/Root/res/icc/Adobe/CMYK/USWebCoatedSWOP.icc \
        --convert-to-color-profile serenity-sRGB.icc \
        cmyk.jpg

from 2.81s to 2.74s on my machine, about 2.5% faster.
2024-02-06 08:44:53 +01:00
..
BinaryFormat.h ICC: Rename XYZ and XYZNumber fields to uppercase 2023-04-29 06:49:36 +02:00
BinaryWriter.cpp LibGfx: Drop tags of unknown type instead of writing invalid icc files 2023-02-24 19:42:00 +01:00
BinaryWriter.h LibGfx: Add start of an ICC profile writer 2023-02-17 20:05:50 -07:00
DistinctFourCC.h LibGfx/ICC: Move enums to dedicated Enums.{cpp,h} 2023-12-04 08:02:36 +00:00
Enums.cpp LibGfx/ICC: Move enums to dedicated Enums.{cpp,h} 2023-12-04 08:02:36 +00:00
Enums.h LibGfx/ICC: Move enums to dedicated Enums.{cpp,h} 2023-12-04 08:02:36 +00:00
Profile.cpp LibGfx/ICC: Add a convert_cmyk_image() method 2024-01-25 15:53:44 +01:00
Profile.h LibGfx/ICC: Add a convert_cmyk_image() method 2024-01-25 15:53:44 +01:00
Tags.cpp LibGfx: Split ICC/Profile.{h,cpp} into several files 2023-01-28 00:27:07 +00:00
Tags.h LibGfx: Add v2 "ncol" tag, expand comment 2023-02-14 19:28:13 +01:00
TagTypes.cpp LibGfx/ICC: Ensure Macintosh ScriptCode length is within expected range 2023-11-12 07:58:39 +01:00
TagTypes.h LibGfx/ICC: In lerp_nd(), use VLAs for left_index, factor 2024-02-06 08:44:53 +01:00
WellKnownProfiles.cpp ICC: Add comment with a link to WellKnownProfiles.cpp 2023-04-29 06:49:36 +02:00
WellKnownProfiles.h LibGfx: Forward-declare TagData in WellKnownProfiles 2023-07-20 06:56:41 +01:00