Cosmetics: make more compact the code for handle_jpeg(), this also allows