1) Is the issue only with the files of JPG format?
2) Was it the same way since Windows 7 installation or has it started off late?
3) By saying "some files using Windows Photo viewer they are squashed down to a horizontal line about 5 pixels thick" do you mean to say that the issue is not with all the pictures of JPG format also?
Not sure of what exactly is causing the issue. For now I would suggest you to run a System File checker (SFC) scan and see if it finds any corrupt files.
To do this, follow these steps:
1. Open an elevated command prompt. To do this, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.
2.Type the following command, and then press ENTER:
sfc /scannow
The sfc /scannow command scans all protected system files and replaces incorrect versions with correct Microsoft versions.
support.microsoft.comLet us know if that fixes the issue or for further support on the issue.
Varun J: MICROSOFT SUPPORT
Visit our Microsoft Answers Feedback Forum
social.answers.microsoft.com and let us know what you think.