They do, you just misread the whole thing... He doesn't want to encode the images just to grab the size from the header or file itself, he wants to pre-calculate this information and the suggested method would be to use a pipe as a bridge to speed up the process, however you guys overlooked that most of the encoding time is lost on the processing of the raw data into the new format rather than in i/o operations.
You can't really estimate sizes for JPEG to any usable extent because of the nature of this lossy format. Same would go for any compression-enabled encoder, because you must analyze the data before you can perform assumptions with it.