Unable to open a jpeg

I can usually figure things out by hunting for the right YouTube video, but this one has me stumped. I had a friend scan and stitch together a long map. He sent me a email with the attachment, and all I see is a black screen. I can save the file, and it says it is about 15mb, I can even see a thumbnail (sometimes). I was able to forward it to other email accounts and they could see it and even share it on their windows systems. I sent it to my work address, where I could open and save it. I even saved it to a flashdrive and tried to import it that way. All I see is a black screen. I can open the file in Gimp and view it, but if I export as a jpeg, all I see is black. If I export as a tiff, I can view it, sort of. I tried using eog in the terminal and it shows up, but no image. I tried setting the properties to read and write with no luck. I was also able to upload the file to a WP site and I was able to pop it into the media library and link it to a post.
I have had my friend scan map photos and maps and never had this issue. i use 18.04 64-bit and I have a i5-9600 cpu.

I assume you are trying to view it with EYE of Mate Image Viewer. I have that same problem. Occasionally some file just can't be read, always big. In the lower left corner it will say something like 7% open.

I just attribute it to a limitation of the application. But hey, if someone can fix or elaborate on it or suggest a better viewer, I too would be interested.

You describe it correctly. I make scans that are much larger in size, such as 2400 dpi tiff files that come in around 250 mb and never have had an issue viewing. What I did was resize the image in question using Gimp from 31 inches wide to 17, and then I was able to view. Thanks for letting me know that I am not the only one!

JPEG has an absolute limit of 64K pixels in either dimension. Sounds like you might be running into that.

Bitmaps are counted in pixels and not in print measurements.
JPG has a natural limitation to 65.000 pixels.
If you have an image of 31 inches and 2400 DPI, this would be 72.000 pixels.

This scan was not at 2400 dpi, I was only trying to say that I have made large high res scans and never had this issue. Also I could open the image on a windows 10 machine. So unless Linux handles jpegs differently, then the win 10 should not have opened it. I solved the issue by resizing in gimp. Who knows? Odd crap happens.

I corrected my maximum size for JPGs from 30.000 to 65.000 pixels.
Nevertheless, it's down to either the size (keep an eye on the pixels and not the inches) and of course the codec that a scanner uses. You can find out this if you scan the same type of JPG but smaller so that the limitation in pixels isn't the cause of the problem.
It's not unusual that a codec used in a camera/scanner isn't supported in either system.
The same with TIFF. Even worse. TIFF codecs are extremely difficult to handle.

Also, a DPI of 2400 doesn't make sense. DPIs are just for printing and most printers even the professionals deal with a maximum of 1200 only.
You can even have a picture with only 1 DPI and you wouldn't see any difference as long as you look at it on a monitor. Just give it a try.

Sorry, but I beg to differ. That is absolutely not true for anything even remotely detailed, and I say this even though I have poor eyesight and shouldn't be able to tell the difference. I've tried 1 DPI and it looks horrible, unless it's abstract art you're trying to render; then you wouldn't notice the difference. :wink: But for a map -- absolutely not.


Who knows? Maybe @Michael_Riley is going to print these maps after inspecting that they were scanned properly. I don't know, and you don't know. Granted...

That's true, so maybe @Michael_Riley should scale back the images to 1200 DPI or similar.

I was talking about monitor! Not print out!
An image looked at on a monitor doesn't care how many dots per pixel you use for printing out the image.

I was confused, because when you scan a document at 1200 DPI, a 4" x 4" document is 4800px x 4800px, whereas a 1 DPI scan of the same 4-inch document would be a measly 4px x 4px. Not so good on the quality front.

But yes, printing DPI is meaningless on a monitor, I agree with that. But I can hardly think of any applications that would even let you set that and then view the result on a monitor. I figured that scan resolution was what @Michael_Riley was talking about.

I'm sorry if I misunderstood what you were saying.

My question was more about why I could not open the email file as a jpeg. All I saw was black. Even though I could open it on my work win10 computer and I could also upload and post the file in a wordpress website. All things being equal, I could not view it on my Ubuntu Mate OS computer until I scaled it with Gimp. And then I could view it. The whole dpi thing was only to say that I typically scan at very high resolutions (an archive standard) and can view without issue in most cases. It just threw me that I could not view this jpeg image, and hence my question.

@Michael_Riley @gordon
The reason why I mentioned that was in my experience, most people are not aware that these extreme high DPI's lead to pixel increase and on the other side, they are not needed.

Because JPG has got a natural restriction of 65.000 pixels (or 30.000 pixels as in many photo-editing software), it's not uncommon that
a.) either the image was too big (you need to save it in GIMP and find out what actual pixel size it becomes visible)
b.) your scanner uses a codec which is understood by GIMP, but not another preview software.

In other words, run a test with your scanner and your software when it actually stops working (pixel size caused by to high DPI).