 public extension IMPImage{
     
     #if os(OSX)
-
+    
     public convenience init (provider: IMPImageProvider){
         var imageRef:CGImageRef?
         var width  = 0

            let imageByteCount  = bytesPerRow * height
            
            let imageBuffer = provider.context.device.newBufferWithLength( imageByteCount, options: MTLResourceOptions.CPUCacheModeDefaultCache)

            //
            // Currently, OSX does not have work version of texture.getBytes version.
            // Use blit encoder to copy data from device memory
            //
            provider.context.execute({ (commandBuffer) -> Void in

                let blitEncoder = commandBuffer.blitCommandEncoder()
                
                blitEncoder.copyFromTexture(texture,

                false,
                .RenderingIntentDefault)
        }
        
        self.init(CGImage: imageRef!, size: IMPSize(width: width, height: height))
    }
    
    func saveJPEGImage(compression compressionQ:Float, path:String) {
        
        let dr:CGImageDestination! = CGImageDestinationCreateWithURL(
            NSURL(fileURLWithPath: path), "public.jpeg" as CFStringRef , 1, nil)
        
        CGImageDestinationAddImage(dr, self.CGImage!,
            [kCGImageDestinationLossyCompressionQuality as String: 0.9])
        
        CGImageDestinationFinalize(dr);
    }
    
    #endif
    
}