Added the PDF/SVG image type define
This commit is contained in:
parent
aa7ff6f060
commit
cb84dbb273
|
@ -23,6 +23,8 @@ static const SDImageFormat SDImageFormatTIFF = 3;
|
||||||
static const SDImageFormat SDImageFormatWebP = 4;
|
static const SDImageFormat SDImageFormatWebP = 4;
|
||||||
static const SDImageFormat SDImageFormatHEIC = 5;
|
static const SDImageFormat SDImageFormatHEIC = 5;
|
||||||
static const SDImageFormat SDImageFormatHEIF = 6;
|
static const SDImageFormat SDImageFormatHEIF = 6;
|
||||||
|
static const SDImageFormat SDImageFormatPDF = 7;
|
||||||
|
static const SDImageFormat SDImageFormatSVG = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
NSData category about the image content type and UTI.
|
NSData category about the image content type and UTI.
|
||||||
|
|
|
@ -93,6 +93,12 @@
|
||||||
case SDImageFormatHEIF:
|
case SDImageFormatHEIF:
|
||||||
UTType = kSDUTTypeHEIF;
|
UTType = kSDUTTypeHEIF;
|
||||||
break;
|
break;
|
||||||
|
case SDImageFormatPDF:
|
||||||
|
UTType = kUTTypePDF;
|
||||||
|
break;
|
||||||
|
case SDImageFormatSVG:
|
||||||
|
UTType = kUTTypeScalableVectorGraphics;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// default is kUTTypePNG
|
// default is kUTTypePNG
|
||||||
UTType = kUTTypePNG;
|
UTType = kUTTypePNG;
|
||||||
|
@ -120,6 +126,10 @@
|
||||||
imageFormat = SDImageFormatHEIC;
|
imageFormat = SDImageFormatHEIC;
|
||||||
} else if (CFStringCompare(uttype, kSDUTTypeHEIF, 0) == kCFCompareEqualTo) {
|
} else if (CFStringCompare(uttype, kSDUTTypeHEIF, 0) == kCFCompareEqualTo) {
|
||||||
imageFormat = SDImageFormatHEIF;
|
imageFormat = SDImageFormatHEIF;
|
||||||
|
} else if (CFStringCompare(uttype, kUTTypePDF, 0) == kCFCompareEqualTo) {
|
||||||
|
imageFormat = SDImageFormatPDF;
|
||||||
|
} else if (CFStringCompare(uttype, kUTTypeScalableVectorGraphics, 0) == kCFCompareEqualTo) {
|
||||||
|
imageFormat = SDImageFormatSVG;
|
||||||
} else {
|
} else {
|
||||||
imageFormat = SDImageFormatUndefined;
|
imageFormat = SDImageFormatUndefined;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue