support addition Si prefixes

This commit is contained in:
Cristy
2022-11-21 17:08:25 -05:00
parent a3be60dcfc
commit d3acd28720
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
% September 2002 %
% %
% %
% Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization %
% Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
+6 -2
View File
@@ -1081,11 +1081,11 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size,
static const char
*bi_units[] =
{
"", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi", "Yi", (char *) NULL
"", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi", "Yi", "Ri", "Qi", (char *) NULL
},
*traditional_units[] =
{
"", "K", "M", "G", "T", "P", "E", "Z", "Y", (char *) NULL
"", "K", "M", "G", "T", "P", "E", "Z", "Y", "R", "Q", (char *) NULL
};
bytes=1000.0;
@@ -1315,6 +1315,8 @@ MagickExport double InterpretSiPrefixValue(const char *magick_restrict string,
switch ((int) ((unsigned char) *q))
{
case 'q': e=(-30.0); break;
case 'r': e=(-27.0); break;
case 'y': e=(-24.0); break;
case 'z': e=(-21.0); break;
case 'a': e=(-18.0); break;
@@ -1335,6 +1337,8 @@ MagickExport double InterpretSiPrefixValue(const char *magick_restrict string,
case 'E': e=18.0; break;
case 'Z': e=21.0; break;
case 'Y': e=24.0; break;
case 'R': e=27.0; break;
case 'Q': e=30.0; break;
default: e=0.0; break;
}
if (e >= MagickEpsilon)