Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting the error: "Not a JPEG file: starts with 0x89 0x50" [closed]

Why am I getting the message "Not a JPEG file: starts with 0x89 0x50" when I try to open my jpg file?

like image 327
matt burns Avatar asked Jul 03 '12 11:07

matt burns


People also ask

What is invalid JPEG format?

When you try to open JPEG/JPG files, the file explorer returns an error message “Invalid Image File Header”. What does it mean? Well, unfortunately, all your JPEG/JPG files have become corrupt and you can't access until the problem is fixed.

What does the number before JPEG mean?

jpg? The first letter P stands for picture. The second to fourth number/letter represent the date the image is taken. The second number/letter represent month (1-9 for Jan-Sep, ABC for Oct-Dec). The third and fourth number represent day.

Is jpg open?

You can open JPG files with your web browser, like Chrome or Firefox (drag local JPG files onto the browser window), and built-in Microsoft programs like the photo viewer and Paint application. If you're on a Mac, Apple Preview and Apple Photos can open the JPG file.


2 Answers

The file is actually a PNG with the wrong file extension. "0x89 0x50" is how a PNG file starts.

like image 97
matt burns Avatar answered Sep 20 '22 00:09

matt burns


Your file is not a JPEG file, it's just been renamed from a PNG to a JPEG somewhere along the way. Some programs will open this as a recognised file extension and infer the type from the prefix, but obviously not the one you're using.

like image 33
David M Avatar answered Sep 21 '22 00:09

David M