How to convert CFDataRef data to UIImage / NSData - Iphone
Posted
by sagar
on Stack Overflow
See other posts from Stack Overflow
or by sagar
Published on 2010-03-19T06:46:56Z
Indexed on
2010/03/19
6:51 UTC
Read the original article
Hit count: 1156
Hello ! every one.
I am having a little query regarding CFData in Objective C / iPhone Development.
See, Apple documentation has following method for CGPDFStream
CGPDFStreamCopyData(<#CGPDFStreamRef stream#>, <#CGPDFDataFormat *format#>)
Above method return type is CGDataRef. I have data as stream. Now I wish to convert in image. & For that I think I should follow this way.
CGPDFDataFormat t=CGPDFDataFormatJPEG2000;
CFDataRef data = CGPDFStreamCopyData (stream, &t);
After executing above statements - I have some reference in data variable.
Now my Query is - How to convert this CFData to NSData or UIImage ?
I have gone through the documentation of apple - But I am failure to find it.
Thanks in advance for sharing your knowledge.
Sagar
© Stack Overflow or respective owner