iPhone movie timestamp

2010-03-25 Thread John Wright
Hi,

I writing an app that among other things organizes the movies a user takes
by the date and time the movie was shot.  Is there a way to get this
information?  Is the only way to use the timestamp of the movie file on the
phone or is there a way to figure this out by looking inside the movie file
or inside the iphone backup directory on the desktop?

Thanks,

John Wright
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Draw rounded NSImage

2009-12-07 Thread John Wright
Thanks Gideon, that worked.

On Sun, Dec 6, 2009 at 9:03 PM, Gideon King gid...@novamind.com wrote:

 Your code restores the graphics state, which will remove your rounded rect
 clipping path, before you draw the image.

 If you draw the image before restoring the graphics state, you should be
 OK.

 Also you should not need to explicitly set the winding rule.

 HTH

 Gideon

 On 05/12/2009, at 7:22 AM, John Wright wrote:

  I am trying to create a NSImage or NSImageCell with rounded corners
  inside a NSTableView. I can't get anything to work. Here is the best I
  have so far inside my custom NSCell:
 
  - (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView
 {
if (thumbnailLink) {
  NSURL *url = [NSURL URLWithString:thumbnailLink];
  if (url) {
  NSRect imageFrame = [self
 _imageFrameForInteriorFrame:frame];
  NSImage *image = [[NSImage alloc]
 initWithContentsOfURL:url];
  [image setScalesWhenResized:YES];
  [image setSize:NSMakeSize(IMAGE_HEIGHT, IMAGE_WIDTH)];
 
  [NSGraphicsContext saveGraphicsState];
  imageFrame = NSInsetRect(imageFrame, 1, 1);
  NSBezierPath *clipPath = [NSBezierPath
  bezierPathWithRoundedRect:imageFrame cornerRadius:5.0];
  [clipPath setWindingRule:NSEvenOddWindingRule];
  [clipPath addClip];
  [NSGraphicsContext restoreGraphicsState];
  [image drawInRect:imageFrame fromRect:NSMakeRect(0, 0,
  0, 0) operation:NSCompositeSourceIn fraction:1.0];
  [image release];
  }
  }
  ...
 
  Any ideas on how to do this?.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Draw rounded NSImage

2009-12-06 Thread John Wright
I am trying to create a NSImage or NSImageCell with rounded corners
inside a NSTableView. I can't get anything to work. Here is the best I
have so far inside my custom NSCell:

- (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView {
  if (thumbnailLink) {
        NSURL *url = [NSURL URLWithString:thumbnailLink];
        if (url) {
                NSRect imageFrame = [self _imageFrameForInteriorFrame:frame];
                NSImage *image = [[NSImage alloc] initWithContentsOfURL:url];
                [image setScalesWhenResized:YES];
                [image setSize:NSMakeSize(IMAGE_HEIGHT, IMAGE_WIDTH)];

                [NSGraphicsContext saveGraphicsState];
                imageFrame = NSInsetRect(imageFrame, 1, 1);
                NSBezierPath *clipPath = [NSBezierPath
bezierPathWithRoundedRect:imageFrame cornerRadius:5.0];
                [clipPath setWindingRule:NSEvenOddWindingRule];
                [clipPath addClip];
                [NSGraphicsContext restoreGraphicsState];
                [image drawInRect:imageFrame fromRect:NSMakeRect(0, 0,
0, 0) operation:NSCompositeSourceIn fraction:1.0];
                [image release];
        }
}
...

Any ideas on how to do this?.

Thanks,

John
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Stretching NSImage PNGs smoothly

2009-11-19 Thread John Wright
I know about how to use UIKit's

 -(UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth
topCapHeight:(NSInteger)topCapHeight

to stretch a PNG smoothly, e.g when inserting text in an iChat like bubble.
 I would like to do the same on regular AppKit/Cocoa/desktop app using
CoreGraphics or some NSImage related API but couldn't find an equivalent
method.  Does anybody know how to do this in AppKit?

Ref:
http://stackoverflow.com/questions/663435/implement-view-like-standard-iphone-sms-chat-bubbles-view

Thanks,

John Wright
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com