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

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -