I\'m having troubles cropping image. For me CICrop filter is not working properly. If my CIVector x and y (origins) are 0 everything working fine (image is cropped from left
This is how CICrop works -- it crop the rect you specified, and the un-cropped area becomes transparent. If you print extent you will see that it is still the same original rect.
As suggested, you can do a translation. This is now just 1 line, in Swift 5:
let newImage = myCIImage.transformed(by: CGAffineTransform(translationX: -150, y: -150)