ios - Cropping of the image in a particular frame in iphone? -


i have application in need crop image particular frame.ie cgrectmake(20,40, 280,200).then taking image , in

pickerdidfinish

i doing `

    uiimage *image = [info objectforkey:uiimagepickercontrolleroriginalimage];      //code crop     cgrect rect=cgrectmake(20,40,280,180);     cgimageref imageref = cgimagecreatewithimageinrect([image cgimage], rect);     uiimage *newimg = [uiimage imagewithcgimage:imageref];      cgimagerelease(imageref);     cgsize size = [newimg size];     uibutton *btn=[[uibutton alloc]initwithframe:cgrectmake(0, 0, size.width, size.height)];     nslog(@"frame = %@\n", nsstringfromcgrect(btn.frame));   imagedata =[[utility getcompresseddata:newimg]retain];           [[uiapplication sharedapplication] setnetworkactivityindicatorvisible:no];         [self dismissmodalviewcontrolleranimated:yes]; 

`and uploading image .but when got image uploaded server still 360*480.why so.i need have overlay view enables part of camera view user.so user can take whichever part wants.that shown only.but dont know going wrong.can me?


Comments

Popular posts from this blog

javascript - Image onload event not firing in firefox -

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -