Problem in cropping the UIImage using CGContext?

前端 未结 2 2056
太阳男子
太阳男子 2021-01-06 15:28

I developing the simple UIApplication in which i want to crop the UIImage (in .jpg format) with help of CGContext. The developed code till now as follows,

CGImageRef

2条回答
  •  借酒劲吻你
    2021-01-06 16:11

    The context you create to draw the image has the same size that the original image. That's why they have the same size.

    If you don't want to re-invent the wheel, take a look at the TouchCode project on Google Code. You will find UIImage categories that do the job (see UIImage_ThumbnailExtensions.m).

提交回复
热议问题