mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 08:27:35 +00:00
![]() `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. It's only accessed through a span, so there's no additional security risk. 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.74s to 2.66s on my machine, almost 3% faster. (Don't do this in LibPDF's SampledFunction::evaluate() since there's no bound on the dimension of the input function. Realistically, size of the table puts a pretty low bound on that dimension though, so we should probably enforce some bound in SampledFunction::create() and do this there too.) |
||
---|---|---|
.. | ||
BinaryFormat.h | ||
BinaryWriter.cpp | ||
BinaryWriter.h | ||
DistinctFourCC.h | ||
Enums.cpp | ||
Enums.h | ||
Profile.cpp | ||
Profile.h | ||
Tags.cpp | ||
Tags.h | ||
TagTypes.cpp | ||
TagTypes.h | ||
WellKnownProfiles.cpp | ||
WellKnownProfiles.h |