# How many unique Huffman codes can you make. Image I has size 256x256 and has pixels of values 50,100 and 200

Let I (M x N) be an image made only of 3 pixels, how many unique Huffman code can you make (example: Image I has size 256x256, and has pixels of values 50,100 and 200).

If someone can help me how to solve this problem or give me a hint.

I get it there are 6 unique Huffman codes : 0,10,11 or 1,00,01, is the solution correct?

• Many more details are required: how many 50, 100 and 200 valued pixels? Are you looking for the encodings employed by jpeg compression? It is possibly better if you study an open source implementation of the jpeg converter because there are many steps separating the image from the Huffman coding. Aug 29 at 18:14
• This question is from exam and it doesn't have much more details. We done examples like this youtube.com/watch?v=acEaM2W-Mfw . Yes we learned JPEG compression only. Aug 29 at 18:46
• And the image is 256x256 and contains only values 50,100 and 200 for pixels. Aug 29 at 18:58
• image made only of 3 pixels If that was rectangular, $M$ was 3 or 1 and $N = 4 - M$. For one possible symbol, I don't even need a function into a one-bit code. For four values, I either get 4 2-bit codes, or the most probable symbol gets a one bit code, and I need a Huffman code for the remaining three. Aug 29 at 21:55