Question

I have a problem with open an JPG (or even TIF) file on Windows Server 2003. No program want to open a picture. I try to use Windows Preview, MS Paint and event Paint.NET.

Thad "bad" files are generated by OpenText OCR software.

When I copy that "bad" file to my machine, all works fine. Then I resave image on my computer and put back to the Windows Server 2003 - all works!

All seems that such format is not supported by Windows Server 2003, but why? Can anyone help?

Message form MSPaint:


Paint


C:\Temp\output.jpg Paint cannot read this file. This is not a valid bitmap file, or its format is not currently supported.


OK


Was it helpful?

Solution

Finally I found that there are some header added to JPEG file before JPEG content and terminator added after JPEG content. It can be seen through using Hex editor and comparing with regular JPEG file.

Solution is to keep content between two JPEG markers 0xFFD8 and 0xFFD9.

Useful source about JPEG format: http://www.media.mit.edu/pia/Research/deepview/exif.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top