private void write(int[] pixels, int imageWidth, int imageHeight, OutputStream os) throws Exception {	
    	// Write GIF header
		writeHeader(os, true);
		// Set logical screen size
		logicalScreenWidth = imageWidth;
		logicalScreenHeight = imageHeight;
		firstFrame = true;
		// We only need to write one frame, so disable animated flag
    	animated = false;
		// Write the image frame
		writeFrame(pixels, imageWidth, imageHeight, 0, 0, 0, os);
		// Make a clean end up of the image
		os.write(IMAGE_TRAILER);
		os.close();
   }
This is intended to be called first when writing an animated GIF
frame by frame.

@param os OutputStream for the animated GIF
@param logicalScreenWidth width of the logical screen. If it is less than
       or equal zero, it will be determined from the first frame
@param logicalScreenHeight height of the logical screen. If it is less than
       or equal zero, it will be determined from the first frame
@throws Exception
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGIFWriter.java