By ammad.aemiee
via crunchmodo.com
Submitted: Jan 03 2013 / 09:55
For More Source codes visit Image filter Processing Implementation in Xcode for iPhone Using GLImageProcessing iOS Developer Library BJ Image Cropper : BJ Image Cropper is Simple UIVIEW that allows user to do cropping using a cropper which is displayed over an image and you can drag cropper over image areas and do cropping.For this you will need already build .h and .m file which i will provide including whole application . you can get that application by reading above note. How this application Works ? : When this application start running you need to select a picture from camera roll and then image is loaded into the UIIMAGEVIEW . After this You need to press the button Crop when u Touch a cropper will appear on a subview of image and then you have to select your cropping area by touching the ends of rectangle appearing on 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 nontechnical part is to let you 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.
Add your comment