     var extraSamples: [Int] = [] // unspecified == 0, premultiplied == 1, straight == 2
     var bitsPerSample: [Int] = []
     
-    var palette: Data?
+    var palette: [(UInt16, UInt16, UInt16)] = []
     
     var photometric: Int
     

            guard self.bitsPerSample[0] == 8 else { throw ImageRep.Error.Unsupported("Unsupported bits per sample.") }
            if let colorMap = tags.first(where: { $0.tag == .ColorMap }) {
                let offset = colorMap.offset
                let length = 3 << self.bitsPerSample[0]
                self.palette = data.dropFirst(offset).prefix(length)
            }
        case 4: guard self.samplesPerPixel == 1 else { throw ImageRep.Error.InvalidFormat("Invalid samples count.") }
        default: guard self.samplesPerPixel >= self.colorSpace.numberOfComponents else { throw ImageRep.Error.InvalidFormat("Invalid samples count.") }

                            let index = Int(_source.pointee)
                            if index < palette_count {
                                let (r, g, b) = palette[index]
                                _destination.pointee = ARGB64ColorPixel(red: r, green: g, blue: b)
                            }
                            
                            _source += 1
