pub fn check_image_size( encoded_bytes: u64, limit: u64, ) -> Result<(), GenerateError>
Check an encoded image payload without decoding or copying it.