天天看点

图片的的缩放

+ (uiimage*)imagewithimagesimple:(uiimage*)image scaledtosize:(cgsize)newsize

{

uigraphicsbeginimagecontext(newsize);

    [image drawinrect:cgrectmake(0, 0, newsize.width, newsize.height)];

    uiimage* newimage =

uigraphicsgetimagefromcurrentimagecontext();

uigraphicsendimagecontext();

    return newimage;

}