iosobjective-cciimage

Flip CIImage Horizontal


I am trying to flip my CIImage Horizontal with :

image = [image imageByApplyingTransform:CGAffineTransformMakeScale(1, -1)];
image = [image imageByApplyingTransform:CGAffineTransformMakeTranslation(0, sourceExtent.size.height)];

But i always get the image flip vertical instead


Solution

  • Try this way:

    image = [image imageByApplyingTransform:CGAffineTransformMakeScale(-1, 1)];
    image = [image imageByApplyingTransform:CGAffineTransformMakeTranslation(0, sourceExtent.size.height)];