0

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 Working:
NSImage *image = [[NSImage alloc]initWithContentsOfFile:imagePath];                           
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:image];
Andreas Prang
  • 2,187
  • 4
  • 22
  • 33

1 Answers1

0

Here's the solution:

NSImage *image = [[NSImage alloc]initWithContentsOfFile:imagePath]; 
PDFPage *imagePDFPage = [[PDFPage alloc] initWithImage:(CIImage *) image];
tshepang
  • 12,111
  • 21
  • 91
  • 136
Andreas Prang
  • 2,187
  • 4
  • 22
  • 33