An Approach to Improve JPEG for Lossy Still Image Compression Mohammad Ali Akber Dewan, Rashedul Islam, Mohammad Amir Sharif, and Md. Aminul Islam Computer Science & Engineering Discipline, Khulna University, Khulna 9208, Bangladesh Emails: sumon_430@yahoo.com , rashed_406@hotmail.com , amirsharif618@yahoo.com , cseku@khulna.bangla.net Abstract: JPEG (Joint Photographic Experts Group) is one of the most popular compression standard in the field of still image compression. The compression ratio of lossless methods (e.g., Huffman, Arithmetic, LZW) is not high enough for image and video compression, especially when the distribution of pixel values is relatively flat. The lossless encoding schemes can be used as the final step for the lossy compression. In JPEG technique an input image is decomposed with the DCT, quantized and end of block coded to give input symbol sequence. Then JPEG uses entropy coding to compress the image data. In this paper, the proposed method performs a modification at this stage. When the whole image is encoded after applying the entropy (JPEG-like Huffman) encoding, the bitstream of the image is created. Then we split the bit stream into 8 bits blocks and the generation of blocks is done until the whole bits are accommodated with the blocks. After completing the block creation of the whole stream, we apply another compression encoding technique on these blocks, so the average bit rate of each block will be reduced and as a result a better compression ratio can be achieved. Keywords: JPEG, Lossy Compression, Entropy Coding, Quantization, DCT. 1. INTRODUCTION Image usually contains so much data that they need to be compressed prior to storage or transmission. Without the use of compression, an image of size 1024 pixel x 1024 pixel x 24bit would require 3 MB of storage and 7 minutes for transmission if utilizing a high speed, 64 Kbits/s, ISDN line. If the image is compressed at a 10:1 compression ratio, the storage requirement would be reduced to 300 KB and the transmission time will drop to under 6 seconds [1]. At present there are many international standards to compress and decompress images and one of the most successful families of still image compression standards have been resulted from the ongoing work of the Joint Photographic Expert Group (JPEG). In JPEG the image is first subdivided into pixel blocks of size 8 x 8 and then each block is encoded in mainly three steps: DCT computation, quantization, and variable-length code assignment. In the last step entropy (modified Huffman) coding is used to compress data [2]. These compressed data is nothing but a sequence of bits. In our proposed method we use this bitstream and prepare blocks. Each block contains a fixed amount of bits. If the average bit rate of blocks can be minimized, then a considerable compression performance can be found and this is the basic idea behind our proposed method. In this proposed method to reduce the average bit rate of blocks, Huffman encoding technique is used. Because Huffman coding creates variable-length codes, each represented by an integer number of bits. Symbols with higher probabilities get shorter codewords [2]. Huffman coding is the best coding scheme possible when codewords are restricted to integer length, and it is not too complicated to implement [3]. It is therefore the popular coding scheme of choice in many applications. In our proposed method Huffman coding is effective, because integer codeword lengths are suitable for the symbol sequence. As Huffman is a lossless encoding scheme, so there is no possibility of any distortion of the images at this stage. In case of decoding, reverse process can be followed. The important feature of this modification is that it keeps the quality of the image as JPEG does but requires less storage space to store and less time for transmission in the network. 2. AN OVERVIEW OF JPEG The JPEG lossy compression algorithm operates in several successive stages and these are shown in Figure 1. Figure 1. Block diagram of JPEG still image compression technique F(u, v) DCT Quantization Quantiz. Tables Coding Tables Entropy Coding DPCM RLC Zig Zag Original Image f(i, j) 8X8 Fq(u, v) DC AC Tables Header Data