tag:blogger.com,1999:blog-3829349805301627265.post2143174019321266180..comments2010-04-24T11:25:22.499+00:00Comments on MetaTechnology: Getting at pixel data from a UIImage for iPhone devPhil Nashhttp://www.blogger.com/profile/07697983218189410572noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-3829349805301627265.post-874659054603237302010-04-24T11:25:22.499+00:002010-04-24T11:25:22.499+00:00great ! but it was not working perfectly for me un...great ! but it was not working perfectly for me until i added after the malloc a reset of the allocated memory...<br /><br />-(id) initWithImage: (UIImage*) image<br />{<br />// We'll be needing a chunk of memory to hold the rendered <br />// (alpha channel of the) image...<br />width = image.size.width;<br />int height = image.size.height; <br />pixelData = malloc( width * height );<br /><br />// reset of memory :<br />for (int i=0; i<width*height; i++) {<br />pixelData[i] = 0;<br />}<br />...<br />...<br /><br />ilboued !Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3829349805301627265.post-23324657155681540362009-02-24T23:18:00.000+00:002009-02-24T23:18:00.000+00:00Can you provide any more information about getting...Can you provide any more information about getting the color data instead of just the alpha channel?<BR/><BR/>I have 4 channel pixelData, but I don't know how to get separate red, blue, and green data.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3829349805301627265.post-90196407173627419782009-02-18T07:18:00.000+00:002009-02-18T07:18:00.000+00:00Great job! But I still have problem in getting all...Great job! <BR/>But I still have problem in getting all the ARGB components.<BR/><BR/>I expand the data space 4 times and use 'KCGImageAlphaFirst', but an error occurs when creating the bitmap context. <BR/><BR/>Any ideas about how to pull out ARGB components?Anonymousnoreply@blogger.com