1. A method for encoding an image, the method comprising: identifying, by an image processor, one or more objects in the image, each of the one or more objects having at least an associated first tag value deterministic of at least a type of the one or more objects; assigning, by the image processor, a second tag value to each pixel in the image to create an encoded image based on the type of object being represented by each pixel, respectively, when a number of types of the one or more objects in the image is less than a predetermined number of object types, wherein the size of the second tag value is less than the size of the first tag value; and defining, by the image processor, a header field for the encoded image to include the first tag value associated with each of the one or more objects and the second tag value mapped with the first tag value.