Do you know if I can send to browser the MIME type image/jpeg
even if the image I am outputting is image/Pjpeg
? Or are they different format?
A PJPEG file is a bitmap image created in the Progressive JPEG format (PJPEG). It contains encoded bitmap data so that the downloaded image appears progressively from a blurry picture to the final sharp image. PJPEG files may also fill alternating horizontal lines until the full picture is revealed.
There are actually no differences between the JPG and JPEG formats. The only difference is the number of characters used. JPG only exists because they required a three-letter extension for the file names in earlier versions of Windows (MS-DOS 8.3 and FAT-16 file systems). So .
Both Are Used for the Same Image TypesBecause they are raster images, and not vectors, both . jpeg and . jpg file formats are best used for digital photography. Digital photographs have extensive color gradations that appear seamless when saved as raster JPEG/JPG images.
JPEG (Joint Photographic Experts Group image) JPEG is actually a data format for compressed photos, rather than a file type. The JFIF (JPEG File Interchange Format) specification describes the format of the files we think of as "JPEG" images.
I believe most browsers wouldn't mind, except Internet Explorer which treats pjpeg files differently.
According to this conversation, you should accept both image/pjpeg and image/jpeg from your clients as upload mime types, but force the image/jpeg when serving downloads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With