ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to crop an image in IOS by using polygon? How to crop image in after rotate image view in IOS?

I very this two concepts please help me.

user-image
تم إضافة السؤال من قبل Purnachandar Rao Voleti , iOS Developer(software developer) , Aadi Zetta Techsoft (P) Ltd
تاريخ النشر: 2013/08/20
megharaj hothur
من قبل megharaj hothur , Lead Engineer , hcl

You can use a CGImageMask;

 

UIView*rotatedViewBox =[[UIView alloc] initWithFrame:CGRectMake(0.0f,0.0f, inImage.size.width, inImage.size.height)]; rotatedViewBox.transform =CGAffineTransformMakeRotation(inAngle);CGSize rotatedSize = rotatedViewBox.frame.size;UIGraphicsBeginImageContext(rotatedSize);CGContextRef bitmap =UIGraphicsGetCurrentContext();CGContextTranslateCTM(bitmap, rotatedSize.width /2.0f, rotatedSize.height /2.0f);CGContextRotateCTM(bitmap, inAngle);CGContextScaleCTM(bitmap,1.0f,-1.0f);CGContextDrawImage(bitmap,CGRectMake(-inImage.size.width /2.0f,-inImage.size.height /2.0f, inImage.size.width, inImage.size.height), inImage.CGImage);UIImage*resultImage =UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();

Munadel Jaitawi
من قبل Munadel Jaitawi , Senior developer , Lamsa

http://iphonedevsdk.com/forum/iphone-sdk-development/79088-draw-a-polygon-and-fill-with-pattern-image.html       http://stackoverflow.com/questions//rotation-and-cropping-an-image-ios

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟