convert NSData to UIImage in iphone
<p>I want to convert nsdata into uiimage and display in imageview.</p>

<p>data is coming from database like this</p>

<pre><code>NSData *imgdata = [[NSData alloc] initWithBytes:sqlite3_column_blob(cmp_sqlstmt,1)
                                         length:sqlite3_column_bytes(cmp_sqlstmt,1)];
</code></pre>

<p>I tried this code</p>

<pre><code>UIImage *image=[UIImage imageWithData:imgdata];

//set image to imageview
[img setImage:image];
</code></pre>

<p>but image is not showing. How do I solve this?</p>
