#If OBJC
#import <AssetsLibrary/AssetsLibrary.h>
-(void)savebitmap :(ALAssetsGroup*) albumhandle :(UIImage*) image
{
CGImageRef img = [image CGImage];
ALAssetsLibrary *library = [self defaultAssetsLibrary];
// UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
[library writeImageToSavedPhotosAlbum:[image CGImage] orientation:(ALAssetOrientation)[image imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error){
if (error) {
[self.bi raiseEvent:nil event:@"savebitmap_result::" params:@[@3,@"Error"]];
} else {
[self.bi raiseEvent:nil event:@"savebitmap_result::" params:@[@1,@"Success"]];
}
}];
}
#End If