         
         // 変形対象部分を切る.
 //        let frameVector = CIVector(x: partRect.origin.x, y: inputImage.extent.size.height - partRect.origin.y - partRect.size.height, z: partRect.size.width, w: partRect.size.height)
-        let frameVector = CIVector(x: 0, y: 200, z: screenWidth, w: 100)
+        let frameVector = CIVector(x: 0, y: 300, z: inputImage.extent.size.width, w: 200)
         guard let cropFilter = CIFilter(name: "CICrop") else { return inputImage }
         cropFilter.setDefaults()
         cropFilter.setValue(inputImage, forKeyPath: kCIInputImageKey)

        
        // 変形対象の上の部分を切る.
//        let frameTop = CIVector(x: 0, y: 0, z: inputImage.extent.size.width, w: partRect.maxY)
        let frameTop = CIVector(x: 0, y: 0, z: screenWidth, w: 200)
        guard let topFilter = CIFilter(name: "CICrop") else {return inputImage}
        topFilter.setDefaults()
        topFilter.setValue(inputImage, forKeyPath: kCIInputImageKey)

        
        // 三つの部分を併合する.
        UIGraphicsBeginImageContext(UIScreen.main.bounds.size)
        
        bottomUIImage.draw(in: CGRect(x: 0, y: 0, width: screenWidth, height: 300 * screenHeight / inputImage.extent.height))
        outputUIImage.draw(in: CGRect(x: 0, y: 300 * screenHeight / inputImage.extent.height, width: screenWidth, height: 200 * screenHeight / inputImage.extent.height))
        topUIImage.draw(in: CGRect(x: 0, y: 500 * screenHeight / inputImage.extent.height, width: screenWidth, height: screenHeight - 500 * screenHeight / inputImage.extent.height))
        
        guard let resultUIImage = UIGraphicsGetImageFromCurrentImageContext() else {return inputImage}
        UIGraphicsEndImageContext()
        
