我无法理解其中的区别。它接缝是相同的但不是!
enybody知道为什么吗?
// Working:
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:
[[NSImage alloc]initWithContentsOfFile:imagePath]];
// NOT Working:
NSImage *image = [[NSImage alloc]initWithContentsOfFile:imagePath];
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:image];
答案 0 :(得分:0)
以下是解决方案:
NSImage *image = [[NSImage alloc]initWithContentsOfFile:imagePath];
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:(CIImage *) image];