Known Bundles List on Mac OS X

   ".abbu" = "/Volumes/Leopard/Users/home/Desktop/Address Book - 27-12-08.abbu";
   ".action" = "/Volumes/Leopard/System/Library/Automator/Watermark PDF.action";
   ".app" = "/Volumes/Leopard/usr/share/java/Tools/Jar Bundler.app";
   ".band"
   ".bundle" = "/Volumes/Leopard/usr/libexec/SmartCardServices/services/slbCryptoflex.bundle";
   ".caction" = "/Volumes/Leopard/System/Library/Automator/Convert Source object to Playlist object.caction";
   ".canonicc" = "/Library/Printers/Canon/BJPrinter/Resources/ICCProfiles/S9000.canonicc";
   ".clr" = "/Volumes/Leopard/System/Library/Colors/System.clr";
   ".component" = "/Volumes/Leopard/System/Library/QuickTime/QuickTimeVR.component";
   ".cssplugin" = "/System/Library/ColorSync/Scripting/TIFF.cssplugin";
   ".ctbl" = "/Library/Printers/EPSON/InkjetPrinter/ColorTable/SPR300Series.ctbl";
   ".dSYM"
   ".db" = "/Library/Printers/Canon/BJPrinter/Resources/Database/4.1.5/S9000.db";
   ".definition" = "/Volumes/Leopard/System/Library/Automator/Script Menu.definition";
   ".dict" = "/Volumes/Leopard/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/Support/OsakaDialect.dict";
   ".driver" = "/Volumes/Leopard/Library/Printers/hp/cups/Photosmart.driver";
   ".framework/Versions/A/Resources/Palm HotSync/Conduits/Apple" = "/Volumes/Leopard/System/Library/PrivateFrameworks/SyncLegacy.framework/Versions/A/Resources/Palm HotSync/Conduits/Apple";
   ".fs" = "/Volumes/Leopard/System/Library/Filesystems/zfs.fs";
   ".help" = "/Volumes/Leopard/Library/Documentation/Help/VoiceOver.help";
   ".iChatTransfer"
   ".iMovieProject"
   ".ibplugin" = "/Volumes/Leopard/System/Library/PrivateFrameworks/Assistant.framework/Versions/A/Resources/Assistant Plugin.ibplugin";
   ".kext"
   ".key"
   ".mailbundle" = "/Users/home/Library/Mail/Bundles/Letterbox.mailbundle";
   ".mdimporter" = "/Volumes/Leopard/System/Library/Spotlight/vCard.mdimporter";
   ".menu" = "/Volumes/Leopard/System/Library/CoreServices/Menu Extras/WWAN.menu";
   ".mpkg"
   ".nib"
   ".numbers"
   ".osax" = "/Volumes/Leopard/System/Library/ScriptingAdditions/StandardAdditions.osax";
   ".pages"
   ".palette"
   ".pbplugin" = "/Volumes/Leopard/Developer/Library/Xcode/Plug-ins/ASKPlugin.pbplugin";
   ".pbproj"
   ".pbxproj"
   ".pde" = "/Library/Printers/Canon/BJPrinter/PDEs/SpecialEffects415.pde";
   ".pdfworkflow" = "/Volumes/Leopard/Library/PDF Services/Save PDF to Web Receipts Folder.pdfworkflow";
   ".pkg"
   ".plugin" = "/Volumes/Leopard/System/Library/UserEventPlugins/SCMonitor.plugin";
   ".prefPane" = "/Volumes/Leopard/System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/DiskImages.prefPane";
   ".profiles" = "/Library/Printers/EPSON/InkjetPrinter/ICCProfiles/Stylus Photo 870.profiles";
   ".pxproj"
   ".qsplugin" = "/Volumes/Leopard/Users/home/Library/Application Support/Quicksilver/PlugIns/Terminal Module.qsplugin";
   ".rtfd"
   ".saver" = "/Volumes/Leopard/System/Library/Screen Savers/Random.saver";
   ".service" = "/Volumes/Leopard/System/Library/Services/Spotlight.service";
   ".sfccolor" = "/Volumes/Leopard/Library/Application Support/iWork '08/Content/Fills/Colors/Spectrum.sfccolor";
   ".sfcimage" = "/Volumes/Leopard/Library/Application Support/iWork '08/Content/Fills/Images/Watermark.sfcimage";
   ".sfctex" = "/Volumes/Leopard/Library/Application Support/iWork '08/Content/Fills/Textures/Wood.sfctex";
   ".sites" = "/Users/janakiram/Library/Application Support/iWeb/Domain.sites";
   ".slideSaver" = "/Volumes/Leopard/System/Library/Screen Savers/Paper Shadow.slideSaver";
   ".template" = "/Volumes/Leopard/System/Library/User Template/user.template";
   ".tokend" = "/Volumes/Leopard/System/Library/Security/tokend/PIV.tokend";
   ".wdgt"
   ".wdgtproj" = "/Volumes/Leopard/Developer/Examples/Quartz Composer/Web Kit And Dashboard/PhotoFrame.wdgtproj";
   ".webplugin" = "/Volumes/Leopard/Library/Internet Plug-Ins/QuickTime Plugin.webplugin";
   ".workflow" = "/Volumes/Leopard/Library/PDF Services/Save PDF to iPhoto.workflow";
   ".xcclassmodel" = "/Volumes/Leopard/Developer/Examples/CoreData/EventManager/EventManager.xcclassmodel";
   ".xcdatamodel" = "/Volumes/Leopard/Developer/Library/Xcode/Project Templates/Application/Quartz Composer Core Data Application/CocoaApp.xcdatamodel";
   ".xcode"
   ".xcodeproj"
   ".xcplugin" = "/Volumes/Leopard/Developer/Library/Xcode/Specifications/GCC 4.0.xcplugin";
   ".xdplugin" = "/Volumes/Leopard/Developer/Library/Xcode/Plug-ins/XDMappingModel.xdplugin";

Blogged with the Flock Browser

Tags: , , ,

How to rotate the image to it’s proper state


- (UIImage *)scaleAndRotateImage:(UIImage *)image
{
int kMaxResolution = 320; // Or whatever

CGImageRef imgRef = image.CGImage;

CGFloat width = CGImageGetWidth(imgRef);
CGFloat height = CGImageGetHeight(imgRef);

CGAffineTransform transform = CGAffineTransformIdentity;
CGRect bounds = CGRectMake(0, 0, width, height);
if (width > kMaxResolution || height > kMaxResolution) {
CGFloat ratio = width/height;
if (ratio > 1) {
bounds.size.width = kMaxResolution;
bounds.size.height = bounds.size.width / ratio;
}
else {
bounds.size.height = kMaxResolution;
bounds.size.width = bounds.size.height * ratio;
}
}

CGFloat scaleRatio = bounds.size.width / width;
CGSize imageSize = CGSizeMake(CGImageGetWidth(imgRef), CGImageGetHeight(imgRef));
CGFloat boundHeight;
UIImageOrientation orient = image.imageOrientation;
switch(orient) {

case UIImageOrientationUp: //EXIF = 1
transform = CGAffineTransformIdentity;
break;

case UIImageOrientationUpMirrored: //EXIF = 2
transform = CGAffineTransformMakeTranslation(imageSize.width, 0.0);
transform = CGAffineTransformScale(transform, -1.0, 1.0);
break;

case UIImageOrientationDown: //EXIF = 3
transform = CGAffineTransformMakeTranslation(imageSize.width, imageSize.height);
transform = CGAffineTransformRotate(transform, M_PI);
break;

case UIImageOrientationDownMirrored: //EXIF = 4
transform = CGAffineTransformMakeTranslation(0.0, imageSize.height);
transform = CGAffineTransformScale(transform, 1.0, -1.0);
break;

case UIImageOrientationLeftMirrored: //EXIF = 5
boundHeight = bounds.size.height;
bounds.size.height = bounds.size.width;
bounds.size.width = boundHeight;
transform = CGAffineTransformMakeTranslation(imageSize.height, imageSize.width);
transform = CGAffineTransformScale(transform, -1.0, 1.0);
transform = CGAffineTransformRotate(transform, 3.0 * M_PI / 2.0);
break;

case UIImageOrientationLeft: //EXIF = 6
boundHeight = bounds.size.height;
bounds.size.height = bounds.size.width;
bounds.size.width = boundHeight;
transform = CGAffineTransformMakeTranslation(0.0, imageSize.width);
transform = CGAffineTransformRotate(transform, 3.0 * M_PI / 2.0);
break;

case UIImageOrientationRightMirrored: //EXIF = 7
boundHeight = bounds.size.height;
bounds.size.height = bounds.size.width;
bounds.size.width = boundHeight;
transform = CGAffineTransformMakeScale(-1.0, 1.0);
transform = CGAffineTransformRotate(transform, M_PI / 2.0);
break;

case UIImageOrientationRight: //EXIF = 8
boundHeight = bounds.size.height;
bounds.size.height = bounds.size.width;
bounds.size.width = boundHeight;
transform = CGAffineTransformMakeTranslation(imageSize.height, 0.0);
transform = CGAffineTransformRotate(transform, M_PI / 2.0);
break;

default:
[NSException raise:NSInternalInconsistencyException format:@"Invalid image orientation"];

}

UIGraphicsBeginImageContext(bounds.size);

CGContextRef context = UIGraphicsGetCurrentContext();

if (orient == UIImageOrientationRight || orient == UIImageOrientationLeft) {
CGContextScaleCTM(context, -scaleRatio, scaleRatio);
CGContextTranslateCTM(context, -height, 0);
}
else {
CGContextScaleCTM(context, scaleRatio, -scaleRatio);
CGContextTranslateCTM(context, 0, -height);
}

CGContextConcatCTM(context, transform);

CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, width, height), imgRef);
UIImage *imageCopy = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

 

return imageCopy;
}

Blogged with Flock

Tags: , , , , ,