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 SDImageFormatHEIC = 5;
|
||||
static const SDImageFormat SDImageFormatHEIF = 6;
|
||||
static const SDImageFormat SDImageFormatPDF = 7;
|
||||
static const SDImageFormat SDImageFormatSVG = 8;
|
||||
|
||||
/**
|
||||
NSData category about the image content type and UTI.
|
||||
|
|
|
@ -93,6 +93,12 @@
|
|||
case SDImageFormatHEIF:
|
||||
UTType = kSDUTTypeHEIF;
|
||||
break;
|
||||
case SDImageFormatPDF:
|
||||
UTType = kUTTypePDF;
|
||||
break;
|
||||
case SDImageFormatSVG:
|
||||
UTType = kUTTypeScalableVectorGraphics;
|
||||
break;
|
||||
default:
|
||||
// default is kUTTypePNG
|
||||
UTType = kUTTypePNG;
|
||||
|
@ -120,6 +126,10 @@
|
|||
imageFormat = SDImageFormatHEIC;
|
||||
} else if (CFStringCompare(uttype, kSDUTTypeHEIF, 0) == kCFCompareEqualTo) {
|
||||
imageFormat = SDImageFormatHEIF;
|
||||
} else if (CFStringCompare(uttype, kUTTypePDF, 0) == kCFCompareEqualTo) {
|
||||
imageFormat = SDImageFormatPDF;
|
||||
} else if (CFStringCompare(uttype, kUTTypeScalableVectorGraphics, 0) == kCFCompareEqualTo) {
|
||||
imageFormat = SDImageFormatSVG;
|
||||
} else {
|
||||
imageFormat = SDImageFormatUndefined;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue