IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label saving. Show all posts
Showing posts with label saving. Show all posts

Friday, March 8, 2013

Saving pictures to custom photos album then reloading


I'm trying to save an image to the photos album. But then I want to save some kind of reference to where it is, so that I can save it (using NSKeyedArchiver), close the app... and then be able to open the app again and reload the image. I'm not seeing how to do this. This is how I'm saving the image... how do I save a reference to it. I tried to save the assetURL variable within the completion block, but I was unable to do so... Would appreciate any help.




[self writeImageToSavedPhotosAlbum:image.CGImage orientationALAssetOrientation)image.imageOrientation


                        completionBlock:^(NSURL* assetURL, NSError* error) {


                             


                          //error handling


                          if (error!=nil) {


                              completionBlock(error);


                              return;


                          }


                          


                           


                      }];


View the original article here

Re: Saving pictures to custom photos album then reloading

I was able to save the assetURL within the completion block. I was having "not assignable" issues before. Seems to work now.


View the original article here

Tuesday, February 26, 2013

NSImage resizing on retina devices, saving my image into just double size. I want resize should not affected by device type.


I'm developing an app for Mac OS X.


I'm trying to resize any NSImage into a specific size like 200x300. It is working fine for Non-retina Mac.


But For Retina Mac, it is resizing the image as 400x600 which is just double, as we are expecting.


My project need is to resize the image as per given size regardless, the device on which application is running is retina or non-retina.


Is there any way to achive the target?


I have tried to measure the scale property, as for retina the scale is 2.0 so we are resizing the image for just half of the required.


But when we connected to monitors, one is retina and other is not retina, it again generating the same problem.


Here is the code which I have used for resizing:


-(void)resizeImageNSImage *)sourceImage newSizeCGSize)newSize
{


   
NSString *newImagePath = [[[Utility documentPath] stringByAppendingPathComponent:imagefolder] stringByAppendingPathComponent:@"imageName"];



   
[sourceImage setScalesWhenResized:YES];
   
[sourceImage setSize:newSize];


   
NSImage *newImage = [[NSImage alloc] initWithSize:newSize];

   
[newImage lockFocus];

   
NSRect frame = NSMakeRect(0, 0, newSize.width, newSize.height);

   
[NSGraphicsContext saveGraphicsState];

   
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:frame xRadius:0 yRadius:0];
   
[path addClip];

   
[sourceImage drawInRect:frame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];

   
[NSGraphicsContext restoreGraphicsState];

   
[newImage unlockFocus];

   
CGImageRef CGImage = [newImage CGImageForProposedRect:nil context:nil hints:nil];
   
NSBitmapImageRep *imgRep = [[[NSBitmapImageRep alloc] initWithCGImage:CGImage] autorelease];


       
NSData *data = [imgRep representationUsingType:NSPNGFileType properties: nil];
       
[[NSFileManager defaultManager] createFileAtPath:newImagePath contents:data attributes:nil];

   
[newImage release];

}


Any help would be very helpful for me.


Thanks


View the original article here

Thursday, January 17, 2013

Apple Configurator-Backup image not saving restrictions password

Hello,

 

I am using apple configurator to create an "image" of an ipad to distribute to many others. I have configured my base ipad as I wish, save the backup in the the configurator, then proceed to image the rest. Everything works fine, however the restrictions password that I set does not store in the new image. Any way to do this, or fix the issue? any help is appreciated. Thanks!


View the original article here