mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
LibGfx/TIFF: Add support for Float and Double types
We previously were considering Float and Doubles as non-supported types.
But this was done in a sneaky way, by letting them hit the default case
in the `read_type` method. So, when I ported this function to the
generator we started to make this types flow into the system without a
proper support there. Since 3124c161
, we would have crashes on images
containing tags with a floating point value.
This commit is contained in:
parent
5d9fa2b9a9
commit
5dfa660a94
2 changed files with 11 additions and 3 deletions
|
@ -523,9 +523,12 @@ private:
|
|||
return read_every_values.template operator()<Rational<u32>>();
|
||||
case Type::SignedLong:
|
||||
return read_every_values.template operator()<i32>();
|
||||
;
|
||||
case Type::SignedRational:
|
||||
return read_every_values.template operator()<Rational<i32>>();
|
||||
case Type::Float:
|
||||
return read_every_values.template operator()<float>();
|
||||
case Type::Double:
|
||||
return read_every_values.template operator()<double>();
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue