Here are some questions for you to see if you really know what's happening during JPEG encoding. I have been told they are quite hard, as the answers do not explicitly appear in the lecture. Answers appear below all the questions. 1. JPEG has a lossy and a lossless mode. Is is possible to compress images using the lossy mode and NOT loose any information? a) No, as the lossless mode would be pointless otherwise. b) Yes, in theory. c) Yes, this is possible right now using the current standard. 2. Images which are not multiples of 8 pixels in size are padded out to the correct size. What colour(s) would be the most efficient to use? a) Black. b) Mid-grey. c) White. d) The same colours as the pixels on the edge. Answers. 1. Yes, in theory. By using a coeeficient divider of 1, no data is lost during the quantisation step. Theoretically, the exact original image could be re-created from the compressed data. Unfortunately in real life, there are always errors which creep in during the DCT and inverse DCT conversion. These errors actually make up a tiny second lossy part of the process. 2. The same colours as the pixels on the edge. When encoding and decoding the pad pixels, we don't actually care what comes out of the IDCT because they are chopped off anyway. However, we want to choose a pad colour which will have as little effect on the DCT coefficients of the real pixels. By making the colour of the right-most pad pixels in the horizontal direction the same as the last valid pixel on the edge, relatively little new information is being added to the image. The same can be done in the vertical direction for the bottm pad pixels.