private static void dither_FloydSteinberg(int[] rgbTriplet, int width, int height, byte[] newPixels, int no_of_color, 
            int[] colorPalette, int transparent_index)
	{
    	int index = 0, index1 = 0, err1, err2, err3, red, green, blue;
	    // Define error arrays
		// Errors for the current line
		int[] tempErr;
		int[] thisErrR = new int[width + 2];
		int[] thisErrG = new int[width + 2];
		int[] thisErrB = new int[width + 2];
        // Errors for the following line
		int[] nextErrR = new int[width + 2];
		int[] nextErrG = new int[width + 2];
		int[] nextErrB = new int[width + 2];

		InverseColorMap invMap;

		invMap = new InverseColorMap();
		invMap.createInverseMap(no_of_color, colorPalette);

		for (int row = 0; row < height; row++) {
			for (int col = 0; col < width; index1++, col++)	{
				 // Transparent, no dither
				if((rgbTriplet[index1] >>> 24) < 0x80 ) {
					newPixels[index1] = (byte)transparent_index;
					continue;
		        }
		
				red = ((rgbTriplet[index1]&0xff0000)>>>16) + thisErrR[col + 1];
				if (red > 255) red = 255;
			    else if (red < 0) red = 0;
	  		    
				green = ((rgbTriplet[index1]&0x00ff00)>>>8) + thisErrG[col + 1];
				if (green > 255) green = 255;
			    else if (green < 0) green = 0;
				
				blue = (rgbTriplet[index1]&0x0000ff) + thisErrB[col + 1];
				if (blue > 255) blue = 255;
			    else if (blue < 0) blue = 0;

                // Find the nearest color index
			    index = invMap.getNearestColorIndex(red, green, blue);				
				newPixels[index1] = (byte)index;// The colorPalette index for this pixel

				// Find errors for different channels
		        err1 = red   - ((colorPalette[index]>>16)&0xff);// Red channel
				err2 = green - ((colorPalette[index]>>8)&0xff);// Green channel
			    err3 = blue  -  (colorPalette[index]&0xff);// Blue channel
			    // Diffuse error
				// Red
                thisErrR[col + 2] += ((err1*7)/16);
				nextErrR[col    ] += ((err1*3)/16);
				nextErrR[col + 1] += ((err1*5)/16);
				nextErrR[col + 2] += ((err1)/16);
                // Green
                thisErrG[col + 2] += ((err2*7)/16);
				nextErrG[col    ] += ((err2*3)/16);
				nextErrG[col + 1] += ((err2*5)/16);
				nextErrG[col + 2] += ((err2)/16);
				// Blue
				thisErrB[col + 2] += ((err3*7)/16);
				nextErrB[col    ] += ((err3*3)/16);
				nextErrB[col + 1] += ((err3*5)/16);
				nextErrB[col + 2] += ((err3)/16);
		    }
			// We have finished one row, switch the error arrays
			tempErr = thisErrR;
			thisErrR = nextErrR;
            nextErrR = tempErr;

			tempErr = thisErrG;
			thisErrG = nextErrG;
			nextErrG = tempErr;
	
	        tempErr = thisErrB;
			thisErrB = nextErrB;
			nextErrB = tempErr;
			
            // Clear the error arrays
			Arrays.fill(nextErrR, 0);
			Arrays.fill(nextErrG, 0);
			Arrays.fill(nextErrB, 0);
		}
	}
Write out a zero length data sub-block
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGIFWriter.java