code: function DecodeFrameType1(frameData, width, height, palFile) {
      var colors = new Uint8Array(width * height * BYTES_PER_PIXEL);
      var setPixel = getPixelSetter();
  
      var j;
      for (var i = 0; i < frameData.length; /*i++*/) {
          var chunkSize = frameData[i++];
          if (chunkSize & 0x80) {
              // Transparent chunk.
              chunkSize = 256 - chunkSize;
              for (j = 0; j < chunkSize; j++) {
                  setPixel(colors, TRANSPARENT_COLOR);
              }
          } else {
              // Regular (colored) chunk.
              for (j = 0; j < chunkSize; j++) {
                  setPixel(colors, palFile.colors[frameData[i++]]);
              }
          }
      }
  
      return {
          width: width,
          height: height,
          colors: colors
      };
  }
docs: Type1 corresponds to 32x32 images with arbitrary color / transparency data.
  
  1). Read one byte (chunkSize).
  2). If chunkSize >= 128:
  - Set (256 - chunkSize) # of transparent pixels.
  3). Else (chunkSize < 128):
  - Set chunkSize # of regular pixels, using the color index to locate
  the color in the palette.
  - Increment the frame counter for each byte read.
  4). Repeat from 1 till end of frame data.