|
|
|
@ -584,6 +584,15 @@ internal class TiffDecoderCore : ImageDecoderCore |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
{ |
|
|
|
// If the color decoder is the palette decoder we need to capture its palette.
|
|
|
|
if (colorDecoder is PaletteTiffColor<TPixel> paletteDecoder) |
|
|
|
{ |
|
|
|
TiffFrameMetadata tiffFrameMetadata = frame.Metadata.GetTiffMetadata(); |
|
|
|
tiffFrameMetadata.LocalColorTable = paletteDecoder.PaletteColors; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -621,11 +630,13 @@ internal class TiffDecoderCore : ImageDecoderCore |
|
|
|
colorDecoder.Decode(stripBufferSpan, pixels, 0, top, width, stripHeight); |
|
|
|
} |
|
|
|
|
|
|
|
// If the color decoder is the palette decoder we need to capture its palette.
|
|
|
|
if (colorDecoder is PaletteTiffColor<TPixel> paletteDecoder) |
|
|
|
{ |
|
|
|
TiffFrameMetadata tiffFrameMetadata = frame.Metadata.GetTiffMetadata(); |
|
|
|
tiffFrameMetadata.LocalColorTable = paletteDecoder.PaletteColors; |
|
|
|
// If the color decoder is the palette decoder we need to capture its palette.
|
|
|
|
if (colorDecoder is PaletteTiffColor<TPixel> paletteDecoder) |
|
|
|
{ |
|
|
|
TiffFrameMetadata tiffFrameMetadata = frame.Metadata.GetTiffMetadata(); |
|
|
|
tiffFrameMetadata.LocalColorTable = paletteDecoder.PaletteColors; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|