Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Trygve Inda
> > On 8 Mar 2014, at 5:02 pm, Trygve Inda wrote: > >> This is slower by about 15%. :( > > > Bummer. > > I'm thinking that two seconds to composite 20 x 1920 x 1080 X 32 bits isn't > too bad actually. That's 165 MB of actual pixel data to iterate over, and at > each pixel it's going to have

Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Graham Cox
On 8 Mar 2014, at 5:02 pm, Trygve Inda wrote: > This is slower by about 15%. :( Bummer. I'm thinking that two seconds to composite 20 x 1920 x 1080 X 32 bits isn't too bad actually. That's 165 MB of actual pixel data to iterate over, and at each pixel it's going to have to perform conside

Re: NSTask for external tool - keep active/prevent relaunch?

2014-03-07 Thread Trygve Inda
> > On Mar 7, 2014, at 8:38 PM, Trygve Inda wrote: > >> I'd like it to work with md5, ffmpeg and others. These all work fine, but >> quit after returning their data. > > There’s nothing you can do about that, unless those tools allow multiple input > files to be passed on the command line. Chec

Re: NSTask for external tool - keep active/prevent relaunch?

2014-03-07 Thread Jens Alfke
On Mar 7, 2014, at 8:38 PM, Trygve Inda wrote: > I'd like it to work with md5, ffmpeg and others. These all work fine, but > quit after returning their data. There’s nothing you can do about that, unless those tools allow multiple input files to be passed on the command line. Check their man p

Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Trygve Inda
> > On 8 Mar 2014, at 4:12 pm, Trygve Inda wrote: > >> I get the same times doing it this way, but maybe my color spaces are >> different. The CGImage returned from my AVAsset is: >> >> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; >> Composite NTSC) >> >> I am not really sure what color spa

Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Graham Cox
On 8 Mar 2014, at 4:12 pm, Trygve Inda wrote: > I get the same times doing it this way, but maybe my color spaces are > different. The CGImage returned from my AVAsset is: > > (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; > Composite NTSC) > > I am not really sure what color space to pass in

Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Trygve Inda
Just a follow up... I modified the color space with: [canvasImageRep bitmapImageRepByConvertingToColorSpace:[[[NSColorSpace alloc] initWithCGColorSpace:colorSpace] autorelease] renderingIntent:NSColorRenderingIntentDefault]; I still get the same times to place 20 images in a 4x5 gri

Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Trygve Inda
> > On 8 Mar 2014, at 2:38 pm, Trygve Inda wrote: > >> Profiling this shows lots of time (90%) is spent in drawInRect and it takes >> about 2 seconds to run. Is there a better way to do this that is faster? >> >> Maybe keep everything in CG and only convert to NSImage at the end? > > > Sounds

Re: [ANN] WFBezierCombinatorics

2014-03-07 Thread Graham Cox
Hi Noah, just a couple of early observations On 8 Mar 2014, at 3:26 pm, Noah Desch wrote: > Graham, I’d be glad to see how it performs with your additional test cases. > Although I spent quite a bit of time handling special cases this is very much > a work in progress and I appreciate any

Re: NSTask for external tool - keep active/prevent relaunch?

2014-03-07 Thread Trygve Inda
>There is, but, first of all, why does this external tool terminate? > What is it? I'd like it to work with md5, ffmpeg and others. These all work fine, but quit after returning their data. T. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: [ANN] WFBezierCombinatorics

2014-03-07 Thread Noah Desch
Graham, I’d be glad to see how it performs with your additional test cases. Although I spent quite a bit of time handling special cases this is very much a work in progress and I appreciate any help anyone is willing to throw in. I didn’t follow a specific algorithm, although much of the cubic

Re: Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Graham Cox
On 8 Mar 2014, at 2:38 pm, Trygve Inda wrote: > Profiling this shows lots of time (90%) is spent in drawInRect and it takes > about 2 seconds to run. Is there a better way to do this that is faster? > > Maybe keep everything in CG and only convert to NSImage at the end? Sounds like you answer

Re: [ANN] WFBezierCombinatorics

2014-03-07 Thread Graham Cox
On 8 Mar 2014, at 2:24 pm, Noah Desch wrote: > ’ve written a category on NSBezierPath that allows boolean operations on > paths (union, intersection, subtraction) which preserves curved elements > throughout the operation and does not require "flattening" paths into line > segments prior to p

Best way to composite/tile multiple CGImages to one image

2014-03-07 Thread Trygve Inda
I need to composite/tile about 20 images in a 4x5 grid to one image. Currently I do: NSImage* canvas = [[[NSImage alloc] initWithSize:NSMakeSize(canvasWide, canvasHigh)] autorelease]; [canvas lockFocus]; Loop { ... Get the CGImage which comes from an AVAssetImageGenerator frameImage =

Re: [ANN] WFBezierCombinatorics

2014-03-07 Thread Jens Alfke
On Mar 7, 2014, at 7:24 PM, Noah Desch wrote: > > I’ve written a category on NSBezierPath that allows boolean operations on > paths (union, intersection, subtraction) which preserves curved elements > throughout the operation and does not require "flattening" paths into line > segments prior

[ANN] WFBezierCombinatorics

2014-03-07 Thread Noah Desch
I’ve written a category on NSBezierPath that allows boolean operations on paths (union, intersection, subtraction) which preserves curved elements throughout the operation and does not require "flattening" paths into line segments prior to processing. I thought this might be a generally useful

Re: NSTask for external tool - keep active/prevent relaunch?

2014-03-07 Thread Jerry Krinock
On 2014 Mar 07, at 18:04, Trygve Inda wrote: > My app sometimes needs to call an external tool that runs via NSTask and > delivers text output back to my app. I profiled it and most of the time > (30%) is spent in [NSConcreteTask launchWithDictionary] > > Is there any technique I can use to kee

Re: Two kinds of NSManagedObject fault?

2014-03-07 Thread Jerry Krinock
Sixten is correct about -isDeleted. It is rarely useful. Regarding these two kinds of managed object faults, your “second” kind is similar to what I described in a message I posted earlier today [1]. In my case, -isFault returns NO -isDeleted returns NO -retainCount returns +1 or greater -g

NSTask for external tool - keep active/prevent relaunch?

2014-03-07 Thread Trygve Inda
My app sometimes needs to call an external tool that runs via NSTask and delivers text output back to my app. I profiled it and most of the time (30%) is spent in [NSConcreteTask launchWithDictionary] Is there any technique I can use to keep this running and thus not have to relaunch it the next t

Re: Two kinds of NSManagedObject fault?

2014-03-07 Thread Sixten Otto
Not as I recall, but it's worth noting that isDeleted only returns YES between the time that a managed object is marked for deletion, and when that change is committed. After that, it returns NO (which kind of sucks). The managedObjectContext will also be nil at that point (though that CAN happen i

Re: Two kinds of NSManagedObject fault?

2014-03-07 Thread Rick Mann
On Mar 7, 2014, at 13:44 , Sixten Otto wrote: > FWIW: trying to access a managed object that has been deleted, but to which > something still has a reference, can produce symptoms like the second kind of > access you describe. Even the isDeleted property? > > Sixten > > > On Fri, Mar 7, 2

Re: Two kinds of NSManagedObject fault?

2014-03-07 Thread Sixten Otto
FWIW: trying to access a managed object that has been deleted, but to which something still has a reference, can produce symptoms like the second kind of access you describe. Sixten On Fri, Mar 7, 2014 at 2:21 PM, Rick Mann wrote: > It seems that objects can be faulted in two ways. In the firs

Two kinds of NSManagedObject fault?

2014-03-07 Thread Rick Mann
It seems that objects can be faulted in two ways. In the first, an access will load the data and things are fine. In the second, an access results in a crash because the fault could not be fulfilled. Is there a way to tell these two apart? -- Rick signature.asc Description: Message signed

What happens when saving over a deleted managed object?

2014-03-07 Thread Rick Mann
I have a situation in which -[NSManagedObjectContext save:] is crashing. I think what's happening is this: Main MOC creates a "Foo". Child MOC A gets a copy of that Foo and hangs on to a reference to it, doing some asynchronous work (uploading it). Child MOC B gets a copy and deletes it, saving

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-07 Thread Greg Parker
On Mar 7, 2014, at 8:50 AM, Kyle Sluder wrote: > On Mar 7, 2014, at 4:54 AM, Bill Cheeseman wrote: >> >> My code calls -[NSArray objectAtIndex:]. I compile it with Xcode 5.0.2 on OS >> X 10.9.x Mavericks in a project with the target's Base SDK set to 10.9 and >> the OS X Deployment Target set

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-07 Thread Aaron Tuller
On Mar 7, 2014, at 4:54 AM, Bill Cheeseman wrote: > My code calls -[NSArray objectAtIndex:]. I compile it with Xcode 5.0.2 on OS > X 10.9.x Mavericks in a project with the target's Base SDK set to 10.9 and > the OS X Deployment Target set to OS X 10.7. It works fine when I run it on > OS X 10.

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-07 Thread Kyle Sluder
On Mar 7, 2014, at 4:54 AM, Bill Cheeseman wrote: > > My code calls -[NSArray objectAtIndex:]. I compile it with Xcode 5.0.2 on OS > X 10.9.x Mavericks in a project with the target's Base SDK set to 10.9 and > the OS X Deployment Target set to OS X 10.7. It works fine when I run it on > OS X 1

Re: No longer existing outlet causes crash in new version of app (iOS)

2014-03-07 Thread Kyle Sluder
On Mar 7, 2014, at 3:22 AM, Koen van der Drift wrote: > > >> On Mar 6, 2014, at 10:02 PM, Kyle Sluder wrote: >> >>> On Thu, Mar 6, 2014, at 04:25 PM, Koen van der Drift wrote: >>> Just changing the name of the VC solved it. >> >> Well, the old build compiled nib is still sitting in your buil

NSPersistentDocument objects "gutted" after Duplicate, Rename in 10.9

2014-03-07 Thread Jerry Krinock
This message regards my SQLite NSPersistentDocument-based app, which has adopted Auto Save and Versions but not Asynchronous Saving, legacy delete/rollback SQLite journaling, built with OS X 10.9 SDK, manual memory management. Its document data model has a singular “document options” object, w

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-07 Thread Fritz Anderson
On 7 Mar 2014, at 6:54 AM, Bill Cheeseman wrote: > My code calls -[NSArray objectAtIndex:]. I compile it with Xcode 5.0.2 on OS > X 10.9.x Mavericks in a project with the target's Base SDK set to 10.9 and > the OS X Deployment Target set to OS X 10.7. It works fine when I run it on > OS X 10.9

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-07 Thread Jens Alfke
On Mar 7, 2014, at 4:54 AM, Bill Cheeseman wrote: > However, when I run it on Mac OS X 10.7 Lion, I get a runtime error claiming > it encountered an invalid argument, namely, the unrecognized selector > -objectAtIndexedSubscript:. The NSArray Class Reference notes that > -objectAtIndexedSubsc

NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-07 Thread Bill Cheeseman
My code calls -[NSArray objectAtIndex:]. I compile it with Xcode 5.0.2 on OS X 10.9.x Mavericks in a project with the target's Base SDK set to 10.9 and the OS X Deployment Target set to OS X 10.7. It works fine when I run it on OS X 10.9 or OS X 10.8. However, when I run it on Mac OS X 10.7 Lio

Re: No longer existing outlet causes crash in new version of app (iOS)

2014-03-07 Thread Koen van der Drift
On Mar 6, 2014, at 10:02 PM, Kyle Sluder wrote: > On Thu, Mar 6, 2014, at 04:25 PM, Koen van der Drift wrote: >> Just changing the name of the VC solved it. > > Well, the old build compiled nib is still sitting in your build > products, so it didn't really "solve" anything. I agree - so is the