ios - How To Get Image With Correct Direction From Asset -


how rotate image correction direction

i have placed below code , not working

uiimage *images  = [uiimage imagewithcgimage:[rep fullscreenimage] scale:[rep scale] orientation:0]; 

uiimageorientation specifies possible orientations of image:

typedef enum {    uiimageorientationup,    uiimageorientationdown ,   // 180 deg rotation     uiimageorientationleft ,   // 90 deg cw     uiimageorientationright ,   // 90 deg ccw     uiimageorientationupmirrored ,    // above image mirrored along         // other axis. horizontal flip     uiimageorientationdownmirrored ,  // horizontal flip     uiimageorientationleftmirrored ,  // vertical flip     uiimageorientationrightmirrored , // vertical flip  } uiimageorientation; 

in code passing 0, means uiimageorientationup enum value, looks default image of course.
need specify parameter kind of orientation want.

e.g. following code vertical image flip:

uiimage *images = [uiimage imagewithcgimage:[rep fullscreenimage] scale:[rep scale] orientation: uiimageorientationleftmirrored]; 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -