         
         let image = UIGraphicsGetImageFromCurrentImageContext()
         UIGraphicsEndImageContext()
-        return image
+        return image*/
     }
     
     override func viewDidLoad() {

        updateNoiseImage()
    }

}


    
    
    func generateNoiseImage(generator:PerlinGenerator, size:CGSize) -> UIImage {

        var width = Int(size.width)
        var height = Int(size.height)
        
        var startTime = CFAbsoluteTimeGetCurrent();
        
        var pixelArray = [PixelData](count: width * height, repeatedValue: PixelData(a: 255, r:0, g: 0, b: 0))
        
        for var i = 0; i < height; i++ {
            for var j = 0; j < width; j++ {
                var val = abs(generator.perlinNoise(Float(j), y: Float(i), z: 0, t: 0))
                if val > 1 {
                    val = 1
                }
                let index = i * width + j
                let u_I = UInt8(val * 255)
                pixelArray[index].r = u_I
                pixelArray[index].g = u_I
                pixelArray[index].b = 0
            }
        }
        let outputImage = imageFromARGB32Bitmap(pixelArray, width: width, height: height)
        
        println(" R RENDER:" + String(format: "%.4f", CFAbsoluteTimeGetCurrent() - startTime));
        
        return outputImage
        
        /*
        let bounds = CGRect(origin: CGPoint.zeroPoint, size: size)
        let opaque = false
        let scale: CGFloat = 0
