JPEGView: assign a different icon for each image format

I ❤️ JPEGView. I love it so much that I install it on every computer I use.

However, it displays ***everything*** using the same generic icon.

I work with a lot of programs/vendors/apps each supporting very specific image formats. Having the ability to immediately identify the file format at a glance is crucial for my efficiency. Imagine you have folders that contain multiple versions of the same image but in different formats:

  • image.jpg
  • image.png
  • image.gif
  • image.bmp
  • etc..

I can't rely on thumbnails since all of them look the same. Most of the time, file names are so long that they hide the extension. I really need these images to show up with distinct icons.

After some research, found a method that actually displays a unique icon for each filetype. It does require a bit of work, but the end result is worth it.


Step 1: Download and Install JPEGView

  1. Download JPEGView:

    • Download the portable version of JPEGView from GitHub.
    • (Optional) Launch Notepad.exe as we will need to write down some info we'll use later.
  2. Extract JPEGView:

    • Extract the downloaded files to a location with no spaces in the path. Ensure the location is not protected by User Account Control (UAC).
    • Write down the complete path to the JPEGView executable as we will use this info later.
  3. Set JPEGView as default viewer:

    • Open an image using JPEGView.
    • Right-click on the image and select Settings/Admin > Set as default viewer...
      This will generate registry entries that associate JPEGView as the default application for all image types.

Step 2: Create Custom Icons

  1. Create icons:

    • Create/Design/Download icons for the file formats you want to customize. These icons must be in ICO format.
  2. Save icons:

    • Save the icons to a directory with no spaces in the path and outside any UAC-protected directories.
    • Write down the complete path to this directory as we will use this info later.

Step 3: Download and Extract SetUserFTA

  1. Read documentation:

    • Review the SetUserFTA blog entry to understand its purpose and functionality. Important note:

      "You must use SetUserFTA for setting file association, because Windows automatically sets it back into Picture app if the registry is manually modified."

  2. Download SetUserFTA:

  3. Extract SetUserFTA:

    • Extract the files to a suitable location on your hard drive. Again, ensure the location is not protected by User Account Control (UAC).

Step 4: Create registry entries

  1. Identify file associations:

    • Navigate to the extracted SetUserFTA executable.
    • Launch a normal, non-admin CMD console and run:
      SetUserFTA.exe get
    • Scroll through the list and write down the entry listed beside the target extension. If the Set as default viewer...  action was successful, this should either be JPEGView or JPEGViewImageFile , depending on the JPEGView version.
  2. Prepare information:

    • The steps below assume that our target extension is 'JXL' and our entry string is 'JPEGViewImageFile'. We now need to prepare registry entries that will handle the 'Open' action and file icon of the target extension.

      By now, we should have all the details needed to create our registry entries:
      • Location of JPEGView executable.
      • Location of your custom icon files.
      • The entry string from the SetUserFTA command.
      • The target file extension.
  3. Create registry entries:

    • Open an admin CMD console and type the following commands. Press enter after each line:
      reg add "HKCR\JPEGViewImageFile.JXL" /ve /t REG_SZ /d "JXL file" /f
      reg add "HKCR\JPEGViewImageFile.JXL\DefaultIcon" /ve /t REG_SZ /d "C:\CONFIG\ICONS\JXL.ICO,0" /f
      reg add "HKCR\JPEGViewImageFile.JXL\shell\open\command" /ve /t REG_SZ /d "\"E:\ProgramFiles\JpegView\JPEGView.exe\" \"%1\"" /f
      
    • You must create registry entries for every file type you want to customize. Note that you may need to use %% instead of % on Windows 11.
      ⚠️ Remember to update the command with your target details.

Step 5: Re-associate File Types

  1. Navigate to SetUserFTA:

    • Go back to the directory where SetUserFTA was extracted.
  2. Re-associate file types:

    • Launch a normal, non-admin CMD console.
    • First, delete the existing association:
      SetUserFTA.exe del .JXL
      
    • Then, associate the extension with your new registry entry:
      SetUserFTA.exe .JXL JPEGViewImageFile.JXL
    • To verify, type the following and check if the value of your target extension has been updated:
      SetUserFTA.exe get
      The JXL entry should now show up as .JXL JPEGViewImageFile.JXL.

    • Repeat the above steps for each file type you need to re-associate.



Now, open Windows Explorer and navigate to a folder that contains images in your target extension. These should now show up using your specified icons and still open up in JPEGView when clicked. If not, either restart the Explorer.exe process or reboot your computer, and then check Windows Explorer again.

For further details, refer to the original discussion on GitHub.

Comments