I can't understand the difference. It seams to be the same but is not!
Does enybody know why?
// Working:
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:
[[NSImage alloc]initWithContentsOfFile:imagePath]];
// NOT W开发者_JAVA百科orking:
NSImage *image = [[NSImage alloc]initWithContentsOfFile:imagePath];
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:image];
Here's the solution:
NSImage *image = [[NSImage alloc]initWithContentsOfFile:imagePath];
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:(CIImage *) image];
精彩评论