Supported graphics file formats

Is there a list of formats available supported by Picture.Open? In the documentation I have only found something about the file formats supported for saving pictures.

(Apart from JPEG, TIFF, PNG, and BMP I have found that .webp and .avif files open just fine – under macOS if it makes a difference – even when these formats don’t appear to be mentioned anywhere in the documentation.)

Xojo relies on the OS loading mechanism, so it varies by OS and version. You can also load PDFs on macOS but not Windows or Linux. Documenting it is a moving target.

1 Like

For macOS, here is a list of file types:

‘BMPf’, ‘.SGI’, ‘TPIC’, ‘8BPS’, ‘icns’, 'BMP ', ‘AVIF’, 'jp2 ', ‘TIFF’, ‘GIFf’, ‘PNGf’, ‘JPEG’, DDS, dds, PVR, pvr, MPO, mpo, PAM, pam, PFM, pfm, PPM, ppm, PGM, pgm, PBM, pbm, HDR, hdr, RGB, rgb, SGI, sgi, WEBP, webp, EXR, exr, TARGA, targa, TGA, tga, CUR, cur, PSB, psb, PSD, psd, ICNS, icns, BMP, bmp, ICO, ico, IIQ, iiq, ORF, orf, MRW, mrw, RWL, rwl, RW2, rw2, RAW, raw, RAF, raf, CRW, crw, HEIF, heif, HEICS, heics, HIF, hif, HEIC, heic, AVIS, avis, AVIF, avif, JXL, jxl, AVCI, avci, KTX2, ktx2, KTX, ktx, ASTC, astc, ATX, atx, J2C, j2c, J2K, j2k, JPF, jpf, JP2, jp2, EFX, efx, JFAX, jfax, JFX, jfx, G3, g3, FAX, fax, TIFF, tiff, DCR, dcr, ERF, erf, AXR, axr, ARW, arw, SR2, sr2, SRF, srf, SRW, srw, PEF, pef, NRW, nrw, NEF, nef, 3FR, 3fr, FFF, fff, MOS, mos, CR3, cr3, CR2, cr2, DXO, dxo, DNG, dng, TIF, tif, GIF, gif, PNG, png, JPS, jps, JFIF, jfif, JPE, jpe, JPEG, jpeg, JPG, jpg, ‘PICT’, PIC, pic, PCT, pct, PICT, pict, 'PDF ', PDF, pdf, svg, ‘EPSF’, PS, ps, EPSI, epsi, EPSF, epsf, EPI, epi, EPS, eps

that includes the 4 letter type codes as well as all the file extensions.

and the image types list:

public.jpeg, public.png, com.compuserve.gif, com.canon.tif-raw-image, com.adobe.raw-image, com.dxo.raw-image, com.canon.cr2-raw-image, com.canon.cr3-raw-image, com.leafamerica.raw-image, com.hasselblad.fff-raw-image, com.hasselblad.3fr-raw-image, com.nikon.raw-image, com.nikon.nrw-raw-image, com.pentax.raw-image, com.samsung.raw-image, com.sony.raw-image, com.sony.sr2-raw-image, com.sony.arw-raw-image, com.sony.axr-raw-image, com.epson.raw-image, com.kodak.raw-image, public.tiff, public.jpeg-2000, com.apple.atx, org.khronos.astc, org.khronos.ktx, org.khronos.ktx2, public.avci, public.jpeg-xl, public.avif, public.avis, public.heic, public.heics, public.heif, com.canon.crw-raw-image, com.fuji.raw-image, com.panasonic.raw-image, com.panasonic.rw2-raw-image, com.leica.raw-image, com.leica.rwl-raw-image, com.konicaminolta.raw-image, com.olympus.sr-raw-image, com.olympus.or-raw-image, com.olympus.raw-image, com.phaseone.raw-image, com.microsoft.ico, com.microsoft.bmp, com.apple.icns, com.adobe.photoshop-image, com.microsoft.cur, com.truevision.tga-image, com.ilm.openexr-image, org.webmproject.webp, com.sgi.sgi-image, public.radiance, public.pbm, public.mpo-image, public.pvr, com.microsoft.dds, com.apple.pict, com.adobe.pdf, public.svg-image, com.adobe.encapsulated-postscript

not sure if that helps you much.

1 Like

fwiw, another user is getting a multi-resolution picture with 0 representations when opening a PDF with Picture.Open.

I tend to tell people “Xojo doesn’t support opening PDF” because of the platform inconsistencies, but this newly reported behavior is also a concern.