         print("filter image = \(outputImage)")
         
         // 変形対象の下の部分を切る.
-        let frameBottom = CIVector(cgRect: CGRect(x: 0, y: 0, width: inputImage.extent.size.width, height: 300))
-//        let frameBottom = CIVector(cgRect: CGRect(x: 0, y: 500, width: inputImage.extent.size.width, height: inputImage.extent.size.height - 500))
+        let frameBottom = CIVector(cgRect: CGRect(x: 0, y: 0, width: inputImage.extent.size.width, height: 500))
+//        let frameBottom = CIVector(cgRect: CGRect(x: 0, y: 0, width: inputImage.extent.size.width, height: partRect.origin.y))
         guard let bottomFilter = CIFilter(name: "CICrop") else {return inputImage}
         bottomFilter.setDefaults()
         bottomFilter.setValue(inputImage, forKeyPath: kCIInputImageKey)

        guard let filter = CIFilter(name: "CIStretchCrop") else {return inputImage}
        filter.setDefaults()
        filter.setValue(cropOutputImage, forKeyPath: kCIInputImageKey)
        filter.setValue(value, forKeyPath: "inputCenterStretchAmount")
        filter.setValue(0, forKeyPath: "inputCropAmount")
        guard let outputImage = filter.outputImage else {return inputImage}

        guard let faceObject = faceObject else {return nil}
        
        // thin対象部分を取得する.
        let faceRect = getFaceFrame(in: inputImage, faceObject)
        let partRect = CGRect(x: faceRect.origin.x, y: faceRect.origin.y + faceRect.size.height * 2 / 3, width: faceRect.size.width, height: faceRect.size.height / 3)
        print("part rect = \(partRect)")
        
        // 変形対象の上の部分を切る.
//        let frameTop = CIVector(cgRect: CGRect(x: 0, y: partRect.origin.y + partRect.height, width: inputImage.extent.size.height, height: inputImage.extent.size.height - partRect.origin.y - partRect.height))
        let frameTop = CIVector(cgRect: CGRect(x: 0, y: 700, width: inputImage.extent.size.width, height: inputImage.extent.size.height - 700))

        guard let topFilter = CIFilter(name: "CICrop") else {return inputImage}
        topFilter.setDefaults()
