Windows photo viewer can’t run because not enough memory

memorywindowswindows 10windows-photo-viewer

Just got a weird error. I was sent an image on email, opened the email in Outlook (Office 365 version) and double clicked image to open. I got this error:

"Windows Photo Viewer can't display this picture because there might not be enough memory available on your computer. Close some programs that you aren't using or free some hard disk space (if it's almost full) and then try again."

enter image description here

Few points:

  • I've always used photo viewer on this laptop and not had an issue before. I restarted and tried to open the image again but no luck.
  • The image is not corrupted. I saved to desktop, tried to open, same issue. I opened with Photoshop, that worked fine. I saved it down from PSD as a new JPG. The new JPG also displays the same message.
  • Any image I've tried to open results in this error.
  • The image is 200KB in size, res of 1428×2000.
  • My laptop has 32GB of RAM, and currently using 8GB of that according to task manager.

What I've tried:

This post from Microsoft: https://social.technet.microsoft.com/Forums/windows/en-US/7b6ae08b-4b5c-443b-9d43-e87ca5e7aeb1/wndows-photo-viewer-operation?forum=w7itproappcompat

  • This didn't work because when I get to colour management, I have no profiles set up so I can't delete.

I've seen this post: Windows Photo Viewer needs more ram?

  • I have 2 video cards built in: standard Intel(R) HD Graphics 530 and an Nvidia Quadro M1000M. I've tried the resolution in the post (moving it to different monitors powered by different video card) and nothing changed.

Disk clean up. Had plenty of spare space anyway but nothing changed.

Specs: I'm running Windows 10 v1909 Build 18363.535 on a Lenovo P50 laptop with 32GB memory, 500GB storage (currently 192GB free), Intel Core i7-6700HQ .

Appreciate if anyone can help fix this. The new Microsoft Photos app is absolutely terrible and I will avoid it at all costs.

Best Answer

I dig this issue because I had similar problem with photos exported from Android Send Reduced Free application.

This issue in my case is related to included Profile-icc in that JPG file.

  Profiles:
  Profile-icc: 536 bytes

It can be verified with ImageMagick identify -verbose command.

This is maybe not solution for Opening it right from Outlook but You can fix that files in source.

I've discovered that when I run convert BADFILE.jpg -strip GOODFILE.jpg command on that file it opens on Windows 7 Photo Viewer without any problem.

-strip  - strip image of all profiles and comments

You can get this whole tool here: https://imagemagick.org/script/download.php

So if You want make that all images again accessible just run batch on them:

mogrify.exe -format jpg -verbose -path C:\OUTPUT_DIR -strip *.jpg

Might be also used relative path like -path OUTPUT_DIR if You want them in subfolder.

If You have to open that files directly from Outlook I'd recommend for example IrfanView which does not have problem with opening that files. Just set it as default graphics files program.

Some people adviced something related to changeing default profiles in Your screen configuration, but I have it set to my Monitor type so I don't want to mess with that settings.

If You want this fully automatic You need 3 things:

  1. DefaultProgramsEditor ( https://defaultprogramseditor.com/ )
  2. ImageMagick ( https://imagemagick.org/download/binaries/ImageMagick-7.0.10-1-portable-Q16-x64.zip )
  3. Batch script which will process opened file.

1) First decompress ImageMagick to c:\apps\ImageMagick-7.0.10-1-portable-Q16-x64

2) Create batch script c:\apps\gfxopen.bat:

@echo off
C:\Apps\ImageMagick-7.0.10-1-portable-Q16-x64\convert.exe %1 -strip c:\temp\temp12345file.jpg

rundll32 "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen c:\temp\temp12345file.jpg

del c:\temp\temp12345file.jpg

3) Decompress DefaultProgramsEditor and run it, then choose File Type Settings > Context Menu > find jpg extension, then > Add...

Command name: Open Fixed Image

Program path: "C:\apps\gfxopen.bat" "%1"

Then choose "Open Fixed Image" and press "Set selected command as default"

Then Save context menu

That's all :)