Skip to content

Instantly share code, notes, and snippets.

@gmph
Created June 22, 2016 08:26
Show Gist options
  • Save gmph/e14cf288a1789937fb24e962b1708a8d to your computer and use it in GitHub Desktop.
Save gmph/e14cf288a1789937fb24e962b1708a8d to your computer and use it in GitHub Desktop.
if (!is_Duplicate){
if (!is_imageData) {
image = im.getImageData(0, 0, im.canvas.width, im.canvas.height).data;
if (!sizeSet) setSize(im.canvas.width, im.canvas.height);
} else {
image = im;
}
getImagePixels(); // convert to correct format if necessary
analyzePixels(); // build color table & map pixels
if (firstFrame) {
writeLSD(); // logical screen descriptior
writePalette(); // global color table
if (repeat >= 0) {
// use NS app extension to indicate reps
writeNetscapeExt();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment