Quote:
Originally Posted by harrytheshark
It's basically telling you that "imgRef" is nil so it can't create an image.
|
I knew that but didn't know what was the problem. I found out with the help from people from the Quartz mailing list...
CGImageSourceCreateImageAtIndex should not be used to create CGImageRef from PDF source ... Instead CGImageSourceCreateThumbnailAtIndex should be used. It worked after I used this method, but there are other problems with this.
There is a bug in Apple frameworks by using CGImageSourceCreateThumbnailAtIndex which end up in huge memory leaks. It only happens when source is PDF. I tried PSD source and no leaks, but having leaks with PDF source. I filled a bug report for this issue.