🌊
ImageIOがサポートしているファイルフォーマットを調べる
ファイルフォーマットを扱う際に、実行デバイスが読み込みや書き出しが出来るかを知る方法
// 読み込み可能なUTType
let mySourceTypes = CGImageSourceCopyTypeIdentifiers()
CFShow(mySourceTypes)
// 書き出し可能なUTType
let myDestinationTypes = CGImageDestinationCopyTypeIdentifiers()
CFShow(myDestinationTypes)
Output
(
"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.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",
"public.radiance",
"public.pbm",
"public.mpo-image",
"public.pvr",
"com.microsoft.dds"
)
(
"public.jpeg",
"public.png",
"com.compuserve.gif",
"public.tiff",
"public.jpeg-2000",
"com.apple.atx",
"org.khronos.ktx",
"org.khronos.ktx2",
"org.khronos.astc",
"com.microsoft.dds",
"public.heic",
"public.heics",
"com.microsoft.ico",
"com.microsoft.bmp",
"com.apple.icns",
"com.adobe.photoshop-image",
"com.adobe.pdf",
"com.truevision.tga-image",
"com.ilm.openexr-image",
"public.pbm",
"public.pvr"
)
See also
Discussion