Apparatus and method for lossless/near-lossless image compression

PURPOSE: According to transmission bandwidth or storage capacity, a lossless/semi lossless image compression apparatus and method are provided to minimize a loss of an image. CONSTITUTION: In order to encode suitably for a target encoding quantity by the usage of the encoded amount of bits, a rate control unit(120) controls an allowable error range in a slice unit. A prediction and modulation unit(150) predict the pixel of a current position with the usage of adjacent pixels. The prediction and modulation unit calculates an error between pixel values. The prediction and modulation modulates the error. An encoder(160) encodes the modulated error.