Only thing that I can suggest is since d2u and u2d adjust for the line feed is to take a sample jpg file and view it in an editor then run the d2u on it and compare to see what type of changes were made.
The problem is that a JPG is mostly a binary file. The utilities dos2unix and unix2dos are text utilities that do a simple replace on end-of-line characters. The problem is that the image data, when viewed as text, contains a lot of CR & LF characters. These aren't actual CRs and LFs, but just random occurrences of those values.
So, the first pass of dos2unix basically corrupted file file. The pass of unix2dos may have undone some of the changes that dos2unix did, but it also grabbed any characters that matched a LF character and inserted a CR before it, which just added more file corruption.
Another part of the problem is that JPG files compress the image. This means they are a little more sensitive to corruption. Corruption can make it so it can't be uncompressed.
So, the bottom line is, these files are probably toast. You'll need to find copies somewhere else.
If these were in a web app, you might look in your browser cache for copies. The file names will be different, but you might be able to view them by renaming the extension to ".jpg".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.