What happens when an image is compressed by thresholding (choosing a suitable threshold and setting the values below the threshold to zero)? Setting the values to zero doesn't mean removing them. They still need to be coded to to be stored or transmitted over a channel, and thus no reduction in the size of image occurs. Is my understanding correct? Are there any steps following the setting to zero step (example Huffman Coding) is performed in order to reduce the number of bits required to encode the image?
Yes you are right.
Thresholding alone cannot perform data compression. By the way, I assume you meant thresholding of transform (DCT) coefficients.
Quantization helps you reduce the number of states the variables can take; hence reduce the number of bits necessary to encode the codebook (totality of codewords).
Thresholding, is applied after (or simultaneously with) quantization and lets you set a number of coefficients to zero. When they are set to zero however, typically a consecutive group of coefficients go to zero together, especially after zigzag scanning of those coefficients .
In effect, for every nonzero DCT coefficient there's a tail of zero coefficients following. Then instead of individually storing each coefficient alone, you define some special symbols for every 1-nonzero-K-zero combination and store its codeword instead. This is a variant of run length coding (RLC) and is the very step where the bit reduction happens.