Do not deprecate implicit transparent color 0

This commit is contained in:
Rangi
2026-09-22 12:03:33 -04:00
parent bc1ed831ec
commit eca8c1f3e7
3 changed files with 0 additions and 11 deletions
-9
View File
@@ -431,7 +431,6 @@ static std::pair<std::vector<size_t>, std::vector<Palette>>
}
// Convert the palette spec to actual palettes
bool gaveDeprecationWarning = false;
for (auto [spec, pal] : zip(options.palSpec, palettes)) {
bool skipFirst = false;
// If the image contains any transparent pixels, color #0 of all palettes is transparent.
@@ -440,14 +439,6 @@ static std::pair<std::vector<size_t>, std::vector<Palette>>
// a transparent color #0, and expecting the spec to only cover the subsequent colors.
if (options.hasTransparentPixels && spec.front().has_value() && spec.front()->isOpaque()) {
skipFirst = true;
if (!gaveDeprecationWarning) {
warning(
WARNING_OBSOLETE,
"Implicit transparent color #0 is deprecated; leave an explicit gap in the "
"palette specs"
);
gaveDeprecationWarning = true;
}
}
for (size_t i = 0; i < options.nbColorsPerPal; ++i) {
// If the spec has a gap, there's no need to copy anything.
-1
View File
@@ -1,3 +1,2 @@
warning: Implicit transparent color #0 is deprecated; leave an explicit gap in the palette specs [-Wobsolete]
error: Each palette spec can only contain up to 1 color plus the implict transparent color
Conversion aborted after 1 error
-1
View File
@@ -1 +0,0 @@
warning: Implicit transparent color #0 is deprecated; leave an explicit gap in the palette specs [-Wobsolete]