             drawTransposed = false
         }
 
-        return resizeToSize(size, withTransform: transformForOrientationWithSize(size), drawTransposed: drawTransposed, interpolationQuality: interpolationQuality)
+        let image = resizeToSize(size, withTransform: transformForOrientationWithSize(size), drawTransposed: drawTransposed, interpolationQuality: interpolationQuality)
+        return image
     }
 
     func cropWithBounds(bounds: CGRect) -> UIImage? {
 
         if let newCGImage = CGImageCreateWithImageInRect(CGImage, bounds) {
-
-            return UIImage(CGImage: newCGImage, scale: screenScale, orientation: imageOrientation)
+            let image = UIImage(CGImage: newCGImage, scale: screenScale, orientation: imageOrientation)
+            return image
         }
 
         return nil

        CGContextDrawImage(bitmapContext, imageRect, image.CGImage)

        if let newCGImage = CGBitmapContextCreateImage(bitmapContext) {
            return UIImage(CGImage: newCGImage, scale: screenScale, orientation: imageOrientation)
        }

        return nil

        CGContextDrawImage(bitmapContext, drawTransposed ? transposedRect : newRect, CGImage)

        if let newCGImage = CGBitmapContextCreateImage(bitmapContext) {
            let image = UIImage(CGImage: newCGImage, scale: screenScale, orientation: imageOrientation)
            return image
        }

        return nil
