Tuesday, October 30, 2007

MagicBrush-Photo Update

MagicBrush-Photo has been updated to Version 1.1



    New features in this version:

  • Added ability to access image metaData via info toolbar item.

  • Added ability to back-up effects in application.
  • Added ability to restore effects from back-up in application.

  • Added ability to import and export custom effects for sharing.



The full changelog can be reviewed here.

We also have introductory pricing. Use coupon code CPN4050708079 when purchasing and receive 50% off the purchase price.

In addition to new features in MagicBrush-Photo, I have just redone my website. Check it out and post any feedback in the forums.

Monday, August 20, 2007

The Tao of Mac - Apple Shoots Self In Foot With iMovie'08

The Tao of Mac - Apple Shoots Self In Foot With iMovie'08: "


This newfound myopia in software design (let’s make it cooler, flashier and more fun, never mind substance or completeness) is why I think iPhoto will never be as remotely useful as Aperture, nor will we ever see a ‘middle-of-the-road” photography product from Apple.

After all, they just torpedoed their video equivalent by competing with themselves and failing."



(Via .)



I hope not. I don't want Apple to compete with MagicBrush-Photo.

Try it now.


If you are one of the first 100 people to purchase using coupon code:


CPN5059878658


you'll get introductory pricing at 50% off.





Monday, July 02, 2007

A more complex Undo/Redo example

One of the issues I was having with MagicBrush-Photo concerned improper behavior of undo/redo functionality.

Undo/Redo is fully described in the Apple documentation and there are lots of samples available, usually highlighting what developers "get for free" when they follow standard practices in Cocoa development. Of course, since these samples are "selling" Cocoa development, they are often not the most complex examples of behavior. For example, it will be a simple setting of a value/property on an object either directly or using bindings.

Naturally, it was one of these more complicated scenarios I was running up against.

Within MagicBrush-Photo, the application of a brush effect to an image (or layer) is not as simple as setting a property. The edit/brush cycle begins with the mouseDown event, and ends with the mouseUp event. So the functionality to undo is any changes to the image or layer from mouseDown to mouseUp. Following the documentation, I got that working pretty easily. Here is some code to show how it works....

The document's (IBAction)mouseDown:(id)sender method calls tailored methods based on the layer type being edited. Here is the method for an image layer:


- (void)mouseDownImageLayer:(NSEvent*)theEvent;
{
NSDictionary *undoState = [NSDictionary dictionaryWithObjectsAndKeys:
[self activeLayer], @"activeLayer",
[[self activeLayer] getLayerImage], @"layerImage",
nil];
[[self undoManager] registerUndoWithTarget:self selector:@selector(undoDrag:) object:undoState];
[[self undoManager] setActionName:NSLocalizedString(@"Brush Stroke", @"undo (brush stroke)")];
[_mask setValue:[[GWBrushesController sharedBrushesController] imageForBrush] forKey:@"inputImage"];
[self mouseDragged:theEvent];
}


This code takes the current layer image and "snaps" a copy to register with the NSUndoManager for the document. It also sets what selector to use to perform the undo operation when invoked.

And here is the undoDrag method:


- (void)undoDrag:(id)undoState
{
id theLayer = [undoState valueForKey:@"activeLayer"];
CIImage *theImage = [undoState valueForKey:@"layerImage"];
[theLayer setLayerImage:theImage];
[self refresh];
}

This code is straight forward and works for undoing a brush stroke.

My issue came with redo, which according to the documentation should "just happen:"

"NSUndoManager is a general-purpose recorder of operations for undo and redo. You register an undo operation by specifying the object that is changing (or the owner of that object), along with a method to invoke to revert its state, and the arguments for that method. NSUndoManager groups all operations within a single cycle of the run loop, so that performing an undo reverts all changes that occurred during the loop. Also, when performing undo an NSUndoManager saves the operations reverted so that you can redo the undos."

Unfortunately, that was not the case. Instead, the "Redo" item in the edit menu would remain grayed out and unavailable after an Undo was performed.

So what was causing my strange behavior? It took a discussion with an Apple Engineer at WWDC to determine. Of course, it only took them five minutes to identify the issue ;-)

Since I am directly invoking the undo manager and managing the undo stack for each document, I have to register the redo action from within the method referenced by the undo selector. So, my undoDrag method needs to becomes:


- (void)undoDrag:(id)undoState
{
id theLayer = [undoState valueForKey:@"activeLayer"];
CIImage *theImage = [undoState valueForKey:@"layerImage"];
NSDictionary *redoState = [NSDictionary dictionaryWithObjectsAndKeys:
[self activeLayer], @"activeLayer",
[[self activeLayer] getLayerImage], @"layerImage",
nil];

[[self undoManager] registerUndoWithTarget:self
selector:@selector(undoDrag:)
object:redoState];

[[self undoManager] setActionName:NSLocalizedString(@"Brush Stroke", @"redo (brush stroke)")];
[theLayer setLayerImage:theImage];
[self refresh];
}

In hindsight, the solution seems very obvious. However, I know from pouring over the documents and second guessing myself to no end, it was not that simple. That's why I'm posting it here, so some other poor coder might save themselves the anguish of beating their head against the wall.

I hope it helps someone.

Saturday, May 19, 2007

MagicBrush-Photo - Alpha Release

MagicBrush-Photo has made it to alpha status.

While there are a few items opened still, I'm working with testers to get enough feedback to help me focus on the technical gaps to close at WWDC.

I'm still looking for testers, so if you want pinpoint editing or retouching for photos on your mac, contact me.



Tuesday, May 01, 2007

MagicBrush-Photo is nearing release!



MagicBrush-Photo is nearing release with functionality complete as we move into beta testing.

Just what functionality is this?
  • Advanced image editing capabilities based on Mac OS X 10.4 "Tiger" Core Image technology. Specifically you have the ability to:
    • Spot editing to retouch photos
    • Compositing of multiple photo and editing layers
    • Cropping final output images
    • Adding text annotations such as copyright notices to your images
  • All of this is available through the power of Core Image which means you have access to all of the effects built into the operating system.
  • Additionally, you can create groupings of effects that are applied as a single operation, and
  • Save those effects groups and settings so they are always available to you.
MagicBrush-Photo is able to read and write the most common image formats, as well as RAW camera formats supported by the operating system.

Learn More about MagicBrush-Photo by visiting our Samples and Tutorials online.

Contact us if you are interested in participating in the beta testing of MagicBrush-Photo