Skip to content

File Type Association

Gary Wang edited this page Nov 30, 2025 · 10 revisions

Version applied to this wiki:

  • Platform: Any
  • Version: Any
  • Suggested Version: >= 1.3.0

Pineapple Pictures is a cross-platform image viewer, it's likely user need to associate the program as a "default app" for some image file types. This Wiki covers about how do do this on different operate systems.

Windows.

Doing this manually can be a tedious work. Thus since Pineapple Pictures 1.3.0, we provided a helper utility program called passoc.exe alongside of our main program ppic.exe, which helps you do exactly that.

You'll notice there are passoc.exe and default-assoc.pacfg* alongside of our main program ppic.exe. If that's the case, simply double-click passoc.exe will brings up a dialog that shows up a list of formats that Pineapple Pictures is supported, then simply click "Check All" (or check the one you want to register manually) and then click "Register Association", it will be done.

Please note that due to Windows 10+ limitation, if you already associate some of the file types to other program, we cannot directly modify the existing file association to Pineapple Pictures. You will need to click "System Settings" button and modify the file type association in Windows' Settings dialog.

When you want to uninstall/unregister the file association, simply uncheck all and then click "Register Association", it will remove the related registry from your system, and then you're free to simply delete the program.

The full source code of passoc.exe is also available to download/review/re-use if preferred, see BLumia/pineapple-assoc-manager. If for some reason you don't want to use passoc.exe, there are alternative solutions as well, the following is an example using a 3rd-party tool called "PORTABLE Registrator" (which is the one that we originally suggest to use when we don't have passoc.exe):

There is a tool named [PORTABLE Registrator](https://github.com/SiL3NC3/PortableRegistrator), which can help you register any portable app as a default program in Windows, which, of course, include Pineapple Pictures. You can use the built-in `Generic Image-Viewer` to associate basic image file types to Pineapple Pictures. If you want to tweak the default configuration, you can use the following configuration as well:
    <AppType>
      <Name>Pineapple Pictures</Name>
      <OpenParameters>"%1"</OpenParameters>
      <FileAssociations>
        <string>.jpg</string>
        <string>.jfif</string>
        <string>.gif</string>
        <string>.bmp</string>
        <string>.png</string>
        <string>.ico</string>
        <string>.jpeg</string>
        <string>.tif</string>
        <string>.tiff</string>
        <string>.webp</string>
        <string>.psd</string>
        <string>.svg</string>
        <string>.kra</string>
        <string>.xcf</string>
        <string>.avif</string>
        <string>.hdr</string>
        <string>.qoi</string>
        <!-- additional image formats version -->
        <string>.apng</string>
        <string>.exr</string>
      </FileAssociations>
    </AppType>

To be clear, the default-assoc.pacfg* configuration file and the sample XML file list above might not exactly match all the formats that Pineapple Pictures supports (learn more) and sometimes users might want to omit some suffixes and use other image viewers as well (e.g. use something else for better SVG support). You can get a full list of supported formats via the --supported-image-formats command line option, and feel free to edit the gist to fit your own need.

* The list of formats used by passoc.exe is defined in default-assoc.pacfg, which is an INI-format configuration file. You don't need to edit it in most of the cases, but by any chance you need to do so, you can read the format documentation at BLumia/pineapple-assoc-manager

macOS

It seems there are no solution to batch setting file type association, so you need to do it manually for each types that you want to associate. Please read: Choose an app to open a file on Mac - Apple Support

Linux

By default, Pineapple Pictures ships a net.blumia.pineapple-pictures.desktop file which already contained a list of MIME-types that are supported by the application. Since users might install additional Qt image-formats plugins from their favorite package manager, the formats beyond the list will be need to associated manually.

Since different desktop environments have their different ways to manage file type association, you need to consult their manual to learn about how to associate the file types then.

Clone this wiki locally