Download Code Link is at the end of the post.
BJ Image Cropper:
BJ Image Cropper is very simple UIVIEW perhaps user friendly that allows user to do cropping, using a cropper which is displayed over an image, and you can drag cropper over image areas and can crop.For this you will need already build .h and .m file which i will provide including whole application. You can get this application by reading above note.
Reference Link
How this application Works ? :
The Reason for explaining this non-technical part is to let people understand the flow of the program.
Now Again.
Touch Select button => Image loaded into UIIMAGEVIEW
Touch Crop button => Image from UIIMAGEVIEW is loaded into UIVIEW and a Cropper is appeared on that UIVIEW which is able to drag.
Touch Apply Crop Button => Cropped Image from the UIVIEW is Loaded into UIIMAGE *Image and then into UIIMAGEVIEW = image ;
Now here Comes the Code:
BJ Image Cropper:
BJ Image Cropper is very simple UIVIEW perhaps user friendly that allows user to do cropping, using a cropper which is displayed over an image, and you can drag cropper over image areas and can crop.For this you will need already build .h and .m file which i will provide including whole application. You can get this application by reading above note.
Reference Link
How this application Works ? :
- When this application start running you will need to select a photo from camera roll and then image is loaded into the UIIMAGEVIEW.
- After this You will need to press the button Crop when you Touch, a cropper will appear on subview of image and then you have to select your cropping area by touching the ends of rectangle appearing in that Subview.
- After this You have to touch another button which takes crop image into a Dummy Variable of type UIIMAGE and then you have to put that Dummy variable into the UIIMAGEVIEW.
The Reason for explaining this non-technical part is to let people understand the flow of the program.
Now Again.
Touch Select button => Image loaded into UIIMAGEVIEW
Touch Crop button => Image from UIIMAGEVIEW is loaded into UIVIEW and a Cropper is appeared on that UIVIEW which is able to drag.
Touch Apply Crop Button => Cropped Image from the UIVIEW is Loaded into UIIMAGE *Image and then into UIIMAGEVIEW = image ;
Now here Comes the Code:
- This is update is Used to update the gui mask or rectangle which is on UIVIEW.
- Size of this Rectangle can also be changed by holding clicks at the ends of rectangle corners.
- In this function if origin is changed then a new origin with same height and width is update
- If height and width is changed then a new height and width is update.
- Both above task can be done simultaneously.
- This function uses BJIMAGECropper.h and BjimageCropper.m which will be provided if you need just comment.
UIVIEW |
- This function crops the image this function takes coordinates of mask or rectangle from gui and subtract all pixels from that location to end corners.
Crop |
0 comments:
Post a Comment