0

I want to query a list of all supported image formats (and file extensions) in Mac OS X, so that I can include those file extensions in a Qt "Open Image" dialog. I use CGImage to load the image.

At the moment I use a static list, but I want to dynamically query a list of formats and extensions on the users system.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
Thomas
  • 514
  • 4
  • 14

2 Answers2

0

QImageReader::supportedImageFormats() returns a list of formats: http://qt-project.org/doc/qt-4.8/qimagereader.html#supportedImageFormats

I don't know how you get the filename extensions but it should be easy to have a static list of extensions and pick only supported ones at runtime.

PS. I am sorry I didn't read your question right. You want the formats supported by CGImage, not QImage. Please ignore this answer.

Stephen Chu
  • 12,724
  • 1
  • 35
  • 46
0

Most common supported image types for writing a CGImageRef are declared in UTCoreTypes.h

For more details, see uniform type identifiers for graphics content http://developer.apple.com/library/mac/#documentation/MobileCoreServices/Reference/UTTypeRef/Reference/reference.html

Vincent Wayne
  • 36
  • 1
  • 2