Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-08-2009, 08:29 AM   #3 (permalink)
AlexDPU
Registered Member
 
Join Date: Oct 2009
Posts: 2
AlexDPU is on a distinguished road
Default

Thanks david_david

I have tried that and it doesnt seem to work for my purposes. My Image needs to be a bitmap before filling the byte array. Does converting the Image to a UIImagePNGRepresentation do that??

Here is the code I am using at the moment:
NSData *imgData = UIImagePNGRepresentation(image);

NSUInteger len = [imgData length];
Byte *byteData = (Byte*)malloc(len);
memcpy(byteData, [imgData bytes], len);

//do some stuff with the bytearray later
AlexDPU is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,282
Threads: 93,959
Posts: 402,319
Top Poster: BrianSlick (7,971)
Welcome to our newest member, kurtwatson
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:07 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.