back to panic.com

Panic Blog

Coda 2.0.7 Beta 1, Cabel

December 4th, 2012

It’s minor, but we thought our deepest Coda fans could give Coda 2.0.7 a whirl.

If you’re interested, grab Coda 2.0.7b1 here (51MB).

UPDATE 12/10: The beta has ended. The app has been released for direct customers and submitted to Apple.

Notable changes: improved stability and syntax highlighting performance.

If you find issues, promptly report them thoroughly via Hive!

PS: We also recently solicited, via Twitter, testers for Transmit w/iCloud and Dropbox Favorites Sync (coming soon!), and a new Panic iPad app that’s all about Status. You should follow us!

Posted at 3:17 pm 6 Comments

From the desk of
logan
Engineering Dept.

Fun with Face Detection

Let’s face it (sorry): face detection is cool. It was a big deal when iPhoto added Faces support — the ability to automatically tag your photos with the names of your friends and family adds a personal touch. And Photo Booth and iChat gained some awesome new effects in OS X Lion that can automatically track faces in the frame to add spinning birds and lovestruck hearts and so on. While not always productively useful, face detection is a fun technique.

I’ve seen attempts at duplicating Apple’s face detection technology. (Apple is far from the first company to do it.) There are libraries on GitHub and various blog posts for doing so. But recently I realized that Apple added support for face detection in OS X Lion and iOS 5. It seemed to slip under my radar of new shiny things. Developers now have a direct link to this powerful technology on both platforms right out of the proverbial box.

Using Face Detection through Core Image

Apple’s face detection is exposed through Core Image, the super-useful image manipulation library. Two classes are important: CIDetector and CIFeature (along with its subclass, CIFaceFeature). With a little experimenting one night, I was able to get a sample app detecting faces within a static image in about 10 lines of code:

  1. // Create the image
  2. CIImage *image = [CIImage imageWithContentsOfURL:[NSURL fileURLWithPath:@"Photo.jpg"]];
  3.  
  4. // Create the face detector
  5. NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:CIDetectorAccuracyHigh, CIDetectorAccuracy, nil];
  6.  
  7. CIDetector *faceDetector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:options];
  8.  
  9. // Detect the faces
  10. NSArray *faces = [faceDetector featuresInImage:image];
  11.  
  12. NSLog(@"%@", faces);

Note the dictionary of options. There is only one particularly useful key: CIDetectorAccuracy. It has two possible values: CIDetectorAccuracyLow and CIDetectorAccuracyHigh. The only difference: There seems to be additional processing performed on the image in order to detect faces, but at the cost of higher CPU usage and lower performance.

In cases where you are only apply detection to a single static image, high accuracy is best. Low accuracy becomes handy when manipulating many images at once, or applying the detector to a live video stream. You see about a 2-4x improvement in render time with low accuracy, but face tracking might pick up a couple of false-positives in the background once in a while, or be unable to detect a face at an angle away from the camera as well as high accuracy could.

Now that we have an array of faces, we can find out some information about each face within the image. CIFaceFeature exposes several useful properties to determine the bounding rectangle of the face, as well as the position of each eye and the mouth.

Using these metrics, it’s then possible to draw on top of the image to mark each facial feature. What you get is a futuristic sci-fi face tracker ala the Fifth Element. Leeloo Dallas Multipass, anyone?

  1. // Create an NSImage representation of the image
  2. NSImage *drawImage = [[NSImage alloc] initWithSize:NSMakeSize([image extent].size.width, [image extent].size.height)];
  3. [drawImage addRepresentation:[NSCIImageRep imageRepWithCIImage:image]];
  4.  
  5. [drawImage lockFocus];
  6.  
  7. // Iterate the detected faces
  8. for (CIFaceFeature *face in faces) {
  9. // Get the bounding rectangle of the face
  10. CGRect bounds = face.bounds;
  11.  
  12. [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] set];
  13. [NSBezierPath strokeRect:NSRectFromCGRect(bounds)];
  14.  
  15. // Get the position of facial features
  16. if (face.hasLeftEyePosition) {
  17. CGPoint leftEyePosition = face.leftEyePosition;
  18.  
  19. [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] set];
  20. [NSBezierPath strokeRect:NSMakeRect(leftEyePosition.x - 10.0, leftEyePosition.y - 10.0, 20.0, 20.0)];
  21. }
  22.  
  23. if (face.hasRightEyePosition) {
  24. CGPoint rightEyePosition = face.rightEyePosition;
  25.  
  26. [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] set];
  27. [NSBezierPath strokeRect:NSMakeRect(rightEyePosition.x - 10.0, rightEyePosition.y - 10.0, 20.0, 20.0)];
  28. }
  29.  
  30. if (face.hasMouthPosition) {
  31. CGPoint mouthPosition = face.mouthPosition;
  32.  
  33. [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] set];
  34. [NSBezierPath strokeRect:NSMakeRect(mouthPosition.x - 10.0, mouthPosition.y - 10.0, 20.0, 20.0)];
  35. }
  36. }
  37.  
  38. [drawImage unlockFocus];

With a little more work, it’s pretty easy to apply this technique to live video from the device’s camera using AVFoundation. As you get back frames from AVFoundation, you perform face detection and modify the frame before it is displayed. But I’ll leave that as an activity for the reader. :-)

And amazingly, it even works with cats.

With a little more effort, I was able to grab the closest detected face’s region of the image, and do a simple copy-and-paste onto the other detected faces (adjusting for angle and distance, of course). Behold… Panic’s newest, most terrifying cloning technology!

Here’s a little sample app. Have fun!

Posted at 11:25 am 18 Comments

From the desk of Cabel
Portland, Oregon 97205

App Scams

Like Minecraft? Then surely you’ll love Mooncraft!

Except, well, you really won’t. Really:

What happened here? It’s pretty simple.

1. Scammer makes an extremely simple iOS app and submits it to Apple.

2. Once it’s approved, they change the screenshots, description, and name — things you can edit at any time.  Piggyback off a popular game!

3. Buy hundreds of fake ★★★★★ reviews, somehow.

4. Sit back and relax as you slowly and gently travel towards hell.

This isn’t Apple’s fault, of course — it’s bait-and-switch, the classic inch/mile situation that scammers rely on. How can Apple fix this? Being able to adjust screenshots/descriptions after submitting is important, and we don’t want that to go away. And it’d be unreasonable for Apple to manually review all screenshot changes.

How about this: after an app hits the store, if it has nothing but 1-star reviews (that include text!), and those reviews mention keywords like “scam” a lot, flag it for further inspection?

I bet there’s an algorithm out there that could find these apps pretty quickly.

Either way, Quang Nguyen (which might be a fake name, of course): you’re a terrible person. (Thanks to Steve for missing the tiny popup button and clicking “Buy App” by accident.)

UPDATE 12/10/2012: For a while, Mooncraft was pulled from the store. But, of course, it’s back.

UPDATE 1/10/2013: Apple has announced a new policy that screenshots can only be updated when they accompany a new application binary submitted for review. Hopefully that will put a stop to this particular type of trickery.

Posted at 11:18 am 30 Comments

From the desk of Cabel
Portland, Oregon 97205

VTAC: Enhanced Online Security

A while back, I became obsessed with getting an “Extended Validation” certificate for our website, just so that we can have a little green “Panic Inc” sitting in the address bar.

You know exactly what I’m talking about:

Getting that green rectangle was, put simply, Le Pain Royale. I suppose that’s the point. It also wasn’t cheap.

After hearing me repeatedly complain about the frustrations of getting our Extended Validation certificate, our own Mike Merrill made me a compelling offer.

For the same amount of money I’d spend on an Extended Validation certificate, Mike could provide our customers with a significantly more secure and immutable validation seal, one that would provide true “trust beyond pixels”.

With this idea, VTAC was born.

Art project? Groundbreaking new level of web security? Prank? Your call.

Should you have any doubts about panic.com security, please visit our office and ask to see Mike’s arm.

VTAC seals are now available for qualified third parties. Click here to learn more or request a quote.

Music courtesy 8-Bit Operators. Thanks!
Posted at 3:52 pm 15 Comments

Coda 2.0.5 Beta Ready to Test, Cabel

October 23rd, 2012

For early-access, cutting-edge Coda users: we’re wrapping up another Coda update which eliminates a few possible crashes and hangs, fixes aggressive Preview caching, and improves performance.

If you’re interested, grab Coda 2.0.5b1 here (51MB).

UPDATE 11/5: Beta complete! Coda 2.0.5 has been released.

Then, please use it, and promptly report any issues found in Hive!

Posted at 2:32 pm 18 Comments

Copywriter: kenichi.

Waritsuki Drive Icons

You can finally read Panic’s blog in Japanese! I was unsure what to write for the longest time, but since I’m not good at talking like Cabel, I decided to make and show off some icons. Today, I’m revealing a disk icon with a Japanese pattern design.

The pattern is from a book on “Japanese Patterns” I found in the library purely by accident about half a year ago. The book was interesting, so I decided I wanted to make an icon using one of these patterns.



This collection contains 20 icons with beautiful Retina Display for Mac OS X. I’d be really happy if this icon could spark just a little bit of interest for our culture. Enjoy! :)

Posted at 1:09 pm 30 Comments

From the desk of
Cabel
Engineering Dept.

Burnside: our Tweet-to-Email Gateway

We get a lot of support questions via Twitter which, believe it or not, we love. It forces people to ask questions succinctly, and it forces us to answer succinctly. We think it’s a pretty great way to answer questions.

But the part we don’t love is trying to use the Twitter website, or a third-party web service like “ExactTarget SocialEngage”, ugh that name, to answer these questions. There’s just something inherently slow and inefficient about using the web for rapid-fire, high-volume tasks like answering support questions.

So, we built Burnside, a Tweet-to-Email Gateway.

Tweets go into a regular mailbox. When we reply, they go back out as tweets. Since multiple people can work out of the same IMAP box, it’s fast and efficient. And as an added bonus, as we archive tweets one by one, we’re building our own searchable index of tweets in Mail. Try searching for anything older than a week on the Twitter website!

(And what about the 140 character limit? We also wrote a plugin for Apple Mail that displays a character count in the Mac OS X Mail window.)

Burnside is notable for another reason: it’s a unique Panic foray into open source. Usually we keep these things to ourselves, but why?

We’ve just put Burnside up on GitHub for anyone to tweak and install.

FAIR WARNING: Burnside is for system administrators only. This is not a consumer app, and it requires significant configuration and understanding of your mail server.


Burnside works great for us, and we hope it can prove useful for others out there.

Posted at 2:59 pm 9 Comments

Another Quick Test, Cabel

August 31st, 2012

We’re almost done with Coda 2.0.3, as we keep Coda updates flowing frequently and consistently to make it the best it can be.

Interested? Please download Coda 2.0.3b1.zip and give it a whirl. (Update: Coda 2.0.3 is now available.)

If you find a bug login to Hive, our bug tracker, and file it well.

(No feature suggestions, please, just things that aren’t working right.) Thanks!

Posted at 1:58 pm 18 Comments

Quick Testing Time, Cabel

August 21st, 2012

We’re wrapping up a couple of updates — if you have a moment of spare time, and are feeling testy, we’d love your stamp of approval.

If you find a bug in either, please login to Hive, our bug tracker, and file!

Posted at 1:50 pm 52 Comments

From the desk of Cabel
Portland, Oregon 97205

CandyBar, Mountain Lion, and Beyond

A quick update on CandyBar!

Updated for 10.8.

First, we’ve updated CandyBar for Mac OS X 10.8! You can now customize the 10.8 system icons. Just launch the app and click the big “Update” button to get the latest IconData.

But there’s a catch, or two: in Mountain Lion, Apple changed how the Dock is rendered, so it’s no longer possible to customize the Dock’s look. (You can still customize the indicator lights!) Also, CandyBar still can’t change the internal icons of Mac App Store apps, due to code signing.

CandyBar, although simply changing files on disk, has always fallen into a slightly-uncomfortable-for-us grey area of existence. It seems clear to us that there will undoubtedly come a time (soon?) when CandyBar can no longer customize system icons at all. So, what do we do?

Now free, and unsupported.

Since we’re unsure about the long-term future of changing system icons, we’re not comfortable charging money for CandyBar, and we’re also not comfortable simply making it disappear, instead we’re going to make the current CandyBar free — but unsupported.

That said, being CandyBar fans, we’ll strive to keep CandyBar up-to-date with minor 10.8 releases, so you can keep using it for the foreseeable future! But, if something major changes, on the level of the Dock changes in 10.8, we can’t guarantee compatibility.

First, here’s the latest build of the app:


Then, here’s a serial number everyone can use:

PPQA-YAMA-E3KP-VHXG-B6AL-L

Even if technically unsupported, CandyBar is still super cool. We hope you enjoy it.

(Also, if you bought CandyBar from us in July or so, we will refund you. If interested, e-mail the Iconfactory.)

Finally, CandyBar heads to The Iconfactory.

So where does CandyBar go from here? Well, there’s the other half of the app: the convenient icon organizer, and Quick Drop icon changer, that many of us use often. We’re handing the reins of CandyBar over to our friends at The Iconfactory. They’ve got some thoughts on CandyBar’s future, and where they might take it from here. If you bought CandyBar from us, you will of course be considered if something new shows up. Stay tuned.

Thanks for reading! If you have any questions, please contact support@iconfactory.com.

TL;DR: CandyBar updated for 10.8, but changing system icons won’t work forever, so CandyBar is now free and unsupported — and may turn into something new at The Iconfactory later.

Posted at 11:55 am 394 Comments