¡@

Home 

2014/10/15 ¤U¤È 10:03:36

iphone Programming Glossary: andheight

UIImageWriteToSavedPhotosAlbum save as PNG with transparency?

http://stackoverflow.com/questions/1489250/uiimagewritetosavedphotosalbum-save-as-png-with-transparency

something like the following would work or at least get you started UIImage composeImageWithWidth NSInteger _width andHeight NSInteger _height CGSize _size CGSizeMake _width _height UIGraphicsBeginImageContext _size Draw image with Quartz 2D routines..

Must drawInRect: for a separate context be executed on the main thread?

http://stackoverflow.com/questions/3207536/must-drawinrect-for-a-separate-context-be-executed-on-the-main-thread

scaling looks like this and is a category implementation on top of UIImage UIImage scaledImageWithWidth CGFloat width andHeight CGFloat height CGRect rect CGRectMake 0.0 0.0 width height UIGraphicsBeginImageContext rect.size self drawInRect rect crashing.. the processing. The actual call to the above method looks like this UIImage small bigger scaledImageWithWidth 24.f andHeight 32.f This all works most of the time but occasionally I get an EXC_BAD_ACCESS . Backtrace #0 0x330d678c in ripc_RenderImage.. drawInRect blendMode alpha #5 0x31516098 in UIImage drawInRect #6 0x0000d6e4 in UIImage Scaling scaledImageWithWidth andHeight self 0x169320 _cmd 0x30e6e width 48 height 64 at Users me Documents svn app trunk Classes UIImage Scaling.m 20 #7 0x00027df0..