This paper proposes an efficient framework of high-quality image compression method for upper Gastrointestinal tract endoscopy images. The proposed DEWC coding method saves traditional image preprocessing computations, such as demosaicking and color-space transformation, and directly utilizes raw image data acquired from CMOS sensor. R, G and B band image are then separately encoded by wavelet-based SPECK coding. In a cardinal GI tract environment, the spatial frequency distribution of red component is lower than green or blue, and green component is relatively high while compared to blue and red components. DEWC coding saves more bits on red band while allocating more bits on green and blue bands. Therefore, under a fixed compression ratio, such non-uniform bit-rate allocation may earn a better image quality. To measure quality-loss in non-uniform bit-rate allocation, a quality quantified measurement called color-distortion based on CIE94 color-difference formula is also proposed. By using analytical result of color-distortion in bit-rate and bit-rate-difference analysis, an optimal/suboptimal bit-rate allocation scheme can be found by solving linear equations derived from the relationship of color-distortion and bit-rate-difference. When comparing to general JPEG2000 compression standard, the experimental result shows that proposed DEWC coding has a better image quality in color-distortion measurement and more efficient performance in execution time.