Skip to content

How to add a new supported image format

Christopher Bruns edited this page Jul 18, 2026 · 5 revisions
  1. Create a small image in the new format and place it in test/images
  2. Make sure the image loads correctly when you drag it onto vimage.
  3. Ascertain whether you can save this image format correctly in vimage.
  4. In main_window.py
    1. Add the file extension to the list of extensions mentioned in VimageMainWindow.load_main_image()
    2. If this format can be saved, add its extension to the list in VimageMainWindow._dialog_and_save_image()
  5. Create a new windows file association in file CMake/wix_patch.xml
    1. Create a new stanza in the #PRODUCT section, similar to the JpgOpenAssociation stanza
    2. Insert the correct extensions and mime types. Consult https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types for some file type conventions.
    3. Insert a new unique guid (create one with windows powershell [guid]::NewGuid())
    4. Add a corresponding ComponentRef in the #ProductFeature section
    5. (don't worry too much about the FileTypesFeature section until we get that part of the installer working...)
  6. Create a new MacOS file association in the file CMake/vimage_macos.spec
    1. Under CFBundleDocumentTypes, add a new stanza for the new file type.
    2. Consult https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html for some mac file type conventions.
    3. See also https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
  7. Create a new linux association in CMake/resources/debian/mimetypes-vimage.xml

Clone this wiki locally