Patent ID: 6844882

Claim:
A method for generating an output image from a source image, wherein the colors of the output image are generated from a limited color palette, comprising: receiving a true color for a pixel in the output image from a corresponding pixel in the source image; receiving an accumulated color error for the pixel in the output image from a plurality of neighboring pixels; calculating a target color for the output image pixel from the true color and the accumulated color error; finding a paint color in the limited color palette, wherein the paint color is the color in the limited color palette that is closest to the target color; painting the pixel in the output image with the paint color; receiving a dithering level from a corresponding pixel in a dithering mask associated with the source image, wherein the dithering level specifies the amount of the output pixel's color error to diffuse to neighoring pixels, and wherein the dithering level can specify that less than the total amount of the output pixel's color error is diffused to neighboring pixels; and calculating a color error to diffuse to neighboring pixels in the output image from the target color, the paint color, and the dithering level.