[2007-12-09 14:16:35] drunk CGImageRef *capturedFrame [2007-12-09 14:16:49] Ugh ugh ugh [2007-12-09 14:16:51] CGImageRef [2007-12-09 14:16:54] * Erica breaks out in hives [2007-12-09 14:16:57] UIImage dude [2007-12-09 14:16:57] the captured frame is in the header [2007-12-09 14:17:07] i didnt need a * [2007-12-09 14:17:14] (UIImage *) is the same as cGImageRef [2007-12-09 14:17:22] I HATE CORE FOUNDATION [2007-12-09 14:17:32] really? exactly the same? [2007-12-09 14:17:38] Yes, it's called toll free bridging [2007-12-09 14:17:43] ahh [2007-12-09 14:17:46] google it [2007-12-09 14:18:08] http://www.google.com/search?hl=en&q=cgimageref+toll+free+bridging&btnG=Google+Search [2007-12-09 14:18:18] yeah i know, never new it applied to uiimage [2007-12-09 14:18:28] -->| ikully (ikully@freedom-E3DF5E8E.cust.bluewin.ch) has joined #iphone-uikit [2007-12-09 14:18:28] |<-- i has left irc.osx86.hu (Broken pipe) [2007-12-09 14:18:31] |<-- anima-mcllq has left irc.osx86.hu (Quit: anima-mcllq) [2007-12-09 14:18:34] It applies to everything that is good and decent [2007-12-09 14:18:51] Evening, Erica. [2007-12-09 14:18:51] CFStringRef, NSString * [2007-12-09 14:18:52] Hi Ste [2007-12-09 14:18:54] I'm besmirching Core Foundation [2007-12-09 14:18:57] blooey [2007-12-09 14:19:06] heh [2007-12-09 14:19:09] :D [2007-12-09 14:19:31] are you sure.. so anything that wants a CGImageRef i can use UIImage? [2007-12-09 14:20:37] |<-- Erica has left irc.osx86.hu (Client exited) [2007-12-09 14:20:40] apparently so, that's the idea of toll free bridging [2007-12-09 14:21:28] -->| pogiphone (pogi@freedom-697E37C7.nycmny.east.verizon.net) has joined #iphone-uikit [2007-12-09 14:21:41] -->| Erica (Erica@freedom-42EC5EF6.hlrn.qwest.net) has joined #iphone-uikit [2007-12-09 14:21:48] *tap* Is this thing on? [2007-12-09 14:21:53] What were you all asking? [2007-12-09 14:22:08] yea [2007-12-09 14:22:21] [22:19] are you sure.. so anything that wants a CGImageRef i can use UIImage? [2007-12-09 14:22:35] well if i switch it to uiimage i get this warning: target of assignment not really an lvalue; this will be a hard error in the future... and... [2007-12-09 14:22:41] Yes, Darken [2007-12-09 14:22:51] You can't switch it to UIImage. It has to be (UIImage *) [2007-12-09 14:22:53] i didnt ask [2007-12-09 14:22:57] just relaying for ya [2007-12-09 14:23:01] Ah. [2007-12-09 14:23:01] warning: assignment from incompatible pointer type [2007-12-09 14:23:05] Yes, s/arken/runknbass/ [2007-12-09 14:23:18] :) [2007-12-09 14:23:20] UIImage *foo; [2007-12-09 14:23:28] foo = my_cGImageRef; [2007-12-09 14:23:56] No wait [2007-12-09 14:23:57] My bad [2007-12-09 14:24:12] I'm looking at the headers [2007-12-09 14:24:15] And they are not toll free bridge [2007-12-09 14:24:16] d [2007-12-09 14:24:18] I'm wrong [2007-12-09 14:24:21] UIImage *foo [2007-12-09 14:24:26] [foo imageRef]; [2007-12-09 14:24:27] i was suspect ;-) [2007-12-09 14:24:31] |<-- pogiphone has left irc.osx86.hu (Client exited) [2007-12-09 14:24:32] :( [2007-12-09 14:24:44] foo = [UIImage initWithImageRef:imageref]; [2007-12-09 14:24:55] UIImage contains other stuff along with the image ref [2007-12-09 14:25:01] yeah that's better [2007-12-09 14:25:20] You can also init with an orientation [2007-12-09 14:25:29] - (id)initWithImageRef:(struct CGImage *)fp8 orientation:(int)fp12; [2007-12-09 14:25:31] so how can i fix this so the warning goes away CGImageRef *lowRes = [(id)capturedFrame createLowResolutionFullScreenCGImageRef]; [2007-12-09 14:25:40] does that rotate the view, or the image pixels? [2007-12-09 14:25:57] Dunno, lduncan [2007-12-09 14:25:58] I've used UIImageView in Sensors.app [2007-12-09 14:26:02] With rotating view [2007-12-09 14:26:09] But I haven't tried with UIImage [2007-12-09 14:26:26] Drunknbass: you need to dereference capturedFrame in the line above where you init it [2007-12-09 14:26:32] - (void)acceleratedInX:(float)xx Y:(float)yy Z:(float)zz [2007-12-09 14:26:32] { [2007-12-09 14:26:32] // Create Status feedback string [2007-12-09 14:26:34] NSString *xstring = [NSString stringWithFormat: [2007-12-09 14:26:34] @"X (roll, %4.1f%%): %f\nY (pitch %4.1f%%): %f\nZ (%4.1f%%) : %f", [2007-12-09 14:26:34] 100.0 - (xx + 0.5) * 100.0, xx, [2007-12-09 14:26:34] 100.0 - (yy + 0.5) * 100.0, yy, [2007-12-09 14:26:34] 100.0 - (zz + 0.5) * 100.0, zz]; [2007-12-09 14:26:34] [textView setText:xstring]; [2007-12-09 14:26:35] // Revert Arrow and then rotate to new coords [2007-12-09 14:26:35] [xarrow setTransform:CGAffineTransformIdentity]; [2007-12-09 14:26:35] float angle = atan2(yy, xx); [2007-12-09 14:26:35] angle *= 180.0/3.14159; [2007-12-09 14:26:37] [xarrow setRotationBy:angle]; [2007-12-09 14:26:38] } [2007-12-09 14:26:48] where xarrow is of the class UIImageView [2007-12-09 14:27:24] i dont follow [2007-12-09 14:27:44] -->| pogiphone (pogi@5EC5815D.369204CB.F0F1A037.IP) has joined #iphone-uikit [2007-12-09 14:27:44] you had: CGImageRef capturedFrame = [mainWindow _createCGImageRefRepresentationInFrame: _contentRect]; [2007-12-09 14:27:49] should be CGImageRef *capturedFrame = [mainWindow _createCGImageRefRepresentationInFrame: _contentRect]; [2007-12-09 14:27:50] Drunkenbass: I know you can rotate UIImageView, and have done so (code sample above) but I haven't tried setting the orientation in UIImage [2007-12-09 14:27:57] ooo the * [2007-12-09 14:27:58] in lowRes [2007-12-09 14:28:06] lduncan: Are you sure? [2007-12-09 14:28:14] Usually anything that ends with "ref" is a ref already [2007-12-09 14:28:18] Doesn't need the extra * [2007-12-09 14:29:03] true erica, no * for refs [2007-12-09 14:29:13] CGImageRef newimg = CGImageCreateWithImageInRect(coreimage, CGRectMake(0.0, 0.0, IMAGE_WIDTH, IMAGE_HEIGHT)); [2007-12-09 14:29:19] That's from SendPics [2007-12-09 14:29:36] |<-- pogiphone has left irc.osx86.hu (Client exited) [2007-12-09 14:29:43] yip, so drunk remove the * from lowRes [2007-12-09 14:29:59] k [2007-12-09 14:30:39] =-= lokkju_ is now known as lokkju [2007-12-09 14:30:41] Why are you casting (id)? [2007-12-09 14:30:47] Isn't that kinda pointless/ [2007-12-09 14:30:52] cause it works with it [2007-12-09 14:30:56] doesnt without it [2007-12-09 14:31:03] roger that [2007-12-09 14:31:28] But try it without the id when you take away the extra * [2007-12-09 14:31:37] so at the end of this how can i make sure capturedFrame and lowRes are gone from memory [2007-12-09 14:31:54] release? [2007-12-09 14:31:56] But the iPhone seems to do pretty good garbage collection [2007-12-09 14:32:22] objective 2.0 garbage collection? [2007-12-09 14:32:23] i just want to make sure cause im running out of memory and crashing [2007-12-09 14:32:28] erica: UIImage has a method named imageRef, which returns a CGImage * [2007-12-09 14:32:32] CFRelease() [2007-12-09 14:32:36] instead of having to create it in CG [2007-12-09 14:32:37] Yeah, NerveGas, scroll up [2007-12-09 14:33:02] Erica: foo = [UIImage initWithImageRef:imageref]; [2007-12-09 14:33:10] Erica: [foo imageRef]; [2007-12-09 14:33:25] well its not that simple im trying to access the camera data [2007-12-09 14:33:27] i can only do it some ways [2007-12-09 14:33:41] ilso without the id it says incompatible pointer type [2007-12-09 14:33:47] do you need to do outside the Photo framework? [2007-12-09 14:34:18] i dunno, im trying different things [2007-12-09 14:34:30] Erica i believe drunk is trying to emulate video capture? [2007-12-09 14:34:31] cc = [CameraController sharedInstance]; [2007-12-09 14:34:32] [cc setDelegate:self]; [2007-12-09 14:34:32] [cc startPreview]; [2007-12-09 14:34:44] [cc stopPreview]; [2007-12-09 14:34:45] i had to modify a header to even use createLowResolutionFullScreenCGImageRef [2007-12-09 14:35:05] Modding headers is part of iPhone programming life [2007-12-09 14:35:09] if you haven't modded headers, you haven't really programmed [2007-12-09 14:35:15] Until Apple debuts the SDK [2007-12-09 14:35:15] :D [2007-12-09 14:35:41] lets hope the documentation is complete [2007-12-09 14:35:49] haha [2007-12-09 14:36:36] my app compiles but then in console i see this error [2007-12-09 14:36:56] [NSCFType createLowResolutionFullScreenCGImageRef]: selector not recognized [self = 0x13bfb0] [2007-12-09 14:37:10] Is it a class method? [2007-12-09 14:37:14] did i set it up wrong? [2007-12-09 14:37:22] http://idevdocs.com/function.php?f=21679 [2007-12-09 14:37:39] CGImageRef lowRes = [(id)capturedFrame createLowResolutionFullScreenCGImageRef]; [2007-12-09 14:37:45] thats the line, it compiles but i think its formatted wrong [2007-12-09 14:37:46] - (struct CGImage *)createLowResolutionFullScreenCGImageRef; [2007-12-09 14:38:12] id foo = [[CameraImage] alloc] init]; [2007-12-09 14:38:36] id myImg = [foo createLowResolutionFullScreenCGImageRef]; [2007-12-09 14:38:44] kill the ] after image [2007-12-09 14:39:01] -->| ioffe (ioffe@freedom-388D2F11.nwrknj.east.verizon.net) has joined #iphone-uikit [2007-12-09 14:41:15] warning: initialization from incompatible pointer type [2007-12-09 14:41:23] id lowRes = [foo createLowResolutionFullScreenCGImageRef]; [2007-12-09 14:41:26] on that line [2007-12-09 14:43:38] cound i use - (struct CGImage *) _createCGImageForFormat:(int)fp8 orientation:(int *)fp12 [2007-12-09 14:43:40] Does it run? [2007-12-09 14:43:48] If it runs, ignore the warning [2007-12-09 14:44:13] Erica Drunk doesn't ignore warnings ;-) [2007-12-09 14:44:45] nope [2007-12-09 14:44:49] i'm always telling him to ignore the warnings ;-) [2007-12-09 14:44:49] -->| domynator (domynator@freedom-5E04DF7E.tor.pppoe.execulink.com) has joined #iphone-uikit [2007-12-09 14:45:08] Drunknbass: You do realize this is a completely hacked together development environment, right? [2007-12-09 14:45:16] yup.. it doesnt runt ho [NSCFDictionary setObject:forKey:]: attempt to insert nil value [2007-12-09 14:45:20] tho* [2007-12-09 14:45:25] =-= Mode #iphone-uikit +o Erica by chat.osx86.hu [2007-12-09 14:45:26] =-= Mode #iphone-uikit -o Erica by iDude [2007-12-09 14:45:30] :-o [2007-12-09 14:45:41] Did you alloc and init the dictionary? [2007-12-09 14:45:49] And NSLog your object and key [2007-12-09 14:46:21] http://pastebin.com/d6dd56829 [2007-12-09 14:46:28] and the ids make the code work ;P [2007-12-09 14:46:40] http://pastie.textmate.org/126135 [2007-12-09 14:46:46] That's the compilation of "SendPics" [2007-12-09 14:46:50] oops [2007-12-09 14:46:59] and i also used id lowRes [2007-12-09 14:47:02] and same thing didnt run [2007-12-09 14:47:26] id's will get rid of the warnings, they don't change anything [2007-12-09 14:47:35] |<-- soe has left irc.osx86.hu (Broken pipe) [2007-12-09 14:47:40] well it wouldnt compile i think it errored [2007-12-09 14:47:43] If it works, it works [2007-12-09 14:48:45] yea.. well thats not important [2007-12-09 14:48:54] im trying to get a normal cgimagerec [2007-12-09 14:48:59] ref [2007-12-09 14:49:03] and use the function to output that as a lowres [2007-12-09 14:49:08] yea [2007-12-09 14:49:29] it doesn't work that way [2007-12-09 14:49:57] I think you have to actually be dealing with a real image [2007-12-09 14:50:05] Not just an alloc'ed, inited pointer [2007-12-09 14:50:13] well this looks like it wants a cgimage http://idevdocs.com/function.php?f=21679 [2007-12-09 14:50:55] i think it just returns one from a CameraImage - whatever that is [2007-12-09 14:51:17] Have you tried -(void)cameraController:(id)sender tookPicture:(UIImage*)picture withPreview:(UIImage*)preview jpegData:(NSData*)jpegdata imageProperties:(struct __CFDictionary *)imageProps [2007-12-09 14:51:34] i wasnt actually taking pics because it was too slow for video [2007-12-09 14:51:35] That's what I use for picSnap [2007-12-09 14:51:42] im trying to do video tho [2007-12-09 14:51:47] Good luck with that [2007-12-09 14:52:04] i can get it to work but i can only get 125 frames [2007-12-09 14:52:11] 125 frames? [2007-12-09 14:52:12] Thanks for everything, Erica :) [2007-12-09 14:52:14] so i wanted to lower the quality of the cgimage im storing [2007-12-09 14:52:15] How many per second/ [2007-12-09 14:52:21] 40-45 ish [2007-12-09 14:52:25] You're welcome BHSP [2007-12-09 14:52:31] (First time seeing you on IRC, thought I'd get that in) [2007-12-09 14:52:31] That's very nice, drunknbass [2007-12-09 14:52:49] Are you sending them to disk? [2007-12-09 14:52:53] it would be if i could lower the quality im storing of the image so i dont max the memory out soo fast [2007-12-09 14:53:04] putting them in an array [2007-12-09 14:53:05] can you just paste the bit you're working on? [2007-12-09 14:53:12] then after i will encode them [2007-12-09 14:53:34] Why not just dump to disk as images? [2007-12-09 14:53:39] At least while recording? [2007-12-09 14:53:44] dont know how long that would take [2007-12-09 14:54:03] you have a quick code i can use to dump a cgimage to disk [2007-12-09 14:54:05] too long i'd suspect [2007-12-09 14:54:10] i can have the filename increment with my array [2007-12-09 14:54:11] 15 fps is more than adequate for most video purposes [2007-12-09 14:54:27] If you're doing 40-45 fps, you' should have enough time [2007-12-09 14:54:30] or with my loop [2007-12-09 14:54:32] not array [2007-12-09 14:55:42] getting the image-to-disk code for you [2007-12-09 14:56:30] http://pastebin.com/d58fe210a [2007-12-09 14:56:30] jpeg or what? [2007-12-09 14:56:31] -->| soe (soe@freedom-CAAF2175.hsd1.tx.comcast.net) has joined #iphone-uikit [2007-12-09 14:56:34] thats what i have now [2007-12-09 14:56:42] anything is ok [2007-12-09 14:58:04] if i can dump the CGImage to disk and bypass the array and do it at a resonable speed ill bypass the ram limits [2007-12-09 14:58:17] and will be limited by how fast i can dump the files to disk [2007-12-09 14:58:46] or maybe use both [2007-12-09 14:59:22] have the array dump the file to disk and then release that frame from memory as i have new frames being added to the array, like a buffer [2007-12-09 14:59:55] Do you have it as NSData at all? [2007-12-09 15:00:09] nope [2007-12-09 15:00:22] everything is really hacky right now [2007-12-09 15:00:36] i have a nstimer that runs the function for 10 seconds [2007-12-09 15:00:36] -->| vsc (vsc@freedom-67F9336B.hsd1.il.comcast.net) has joined #iphone-uikit [2007-12-09 15:00:39] In my code, I either use Apple's dump screen (produces tiff) [2007-12-09 15:00:40] both array & dumping, that sounds good, especially if you can detect that the image is not changing so you have a moment to use a freeze frame. [2007-12-09 15:00:41] with a .1 delay [2007-12-09 15:00:45] or the NSData from the callback [2007-12-09 15:01:12] anima the image will change constantly [2007-12-09 15:01:22] well ill try anything to dump the image.. just make sure it can take a cgimage and export an imge from that and i can plug it right in [2007-12-09 15:01:45] yep Darken, but by matter of degree is obviously what is meant. [2007-12-09 15:02:01] he won't easily calculate that [2007-12-09 15:02:11] yeh , that's the rub [2007-12-09 15:02:16] not on the phone [2007-12-09 15:02:20] if! [2007-12-09 15:03:25] look here: http://developer.apple.com/samplecode/ApertureResizer/listing4.html [2007-12-09 15:03:38] |<-- kdbdallas has left irc.osx86.hu (Quit: kdbdallas) [2007-12-09 15:03:58] =-= Kkb is now known as SteveJob [2007-12-09 15:04:10] CGImageDestinationRef [2007-12-09 15:04:53] Darn [2007-12-09 15:04:54] Doesn't seem to be on the iPhone [2007-12-09 15:05:08] But CGImagedestination does! [2007-12-09 15:05:20] CoreGraphics, and PhotoLibrary [2007-12-09 15:15:10] |<-- vsc has left irc.osx86.hu (Connection reset by peer) [2007-12-09 15:19:08] bass [2007-12-09 15:19:09] # dd if=/dev/zero of=dump.raw bs=8192 count=10000 [2007-12-09 15:19:20] 81920000 bytes (82 MB) copied, 21.6039 s, 1.8 MB/s [2007-12-09 15:19:34] CGImageWriteEXIFJPEGToPath([img imageRef], url); [2007-12-09 15:20:11] why is dd lieing to me [2007-12-09 15:20:11] <_BigBoss_> there any way to change font size for only part of the text on a UITableCell row? [2007-12-09 15:20:17] telling me 1.8MB/s is a bunch of crap [2007-12-09 15:20:30] <_BigBoss_> like I want to show EDGE then (ip address) where IP is small text font [2007-12-09 15:20:47] Add another text field to the row [2007-12-09 15:20:47] as a subview [2007-12-09 15:20:57] <_BigBoss_> cool thanks Erica [2007-12-09 15:21:06] I'm sure there's a better way, but *shrug* [2007-12-09 15:21:32] <_BigBoss_> anyway works for me :) [2007-12-09 15:23:05] night all [2007-12-09 15:23:27] im showing you can easily write 10 raw frames @ 640x480 to the flash drive per second [2007-12-09 15:25:23] almost 2fps of full 2MP images [2007-12-09 15:25:39] -->| benanzo|mobile (root@freedom-719D93AF.hsd1.wa.comcast.net) has joined #iphone-uikit [2007-12-09 15:25:45] and if you can get any minimal sort of compression or processing on the images while writing to disk [2007-12-09 15:25:55] no problem to sustain more than that [2007-12-09 15:27:39] g'night Erica. [2007-12-09 15:27:40] -->| kdbdallas (kdbdallas@freedom-34F5DD45.ph.ph.cox.net) has joined #iphone-uikit [2007-12-09 15:28:19] |<-- benanzo|mobile has left irc.osx86.hu (Client exited) [2007-12-09 15:28:41] -->| benanzo|mobile (root@freedom-719D93AF.hsd1.wa.comcast.net) has joined #iphone-uikit [2007-12-09 15:30:15] bye [2007-12-09 15:30:31] and thanks all.