UIImage+Resize.h 824 B

123456789101112131415161718
  1. // UIImage+Resize.h
  2. // Created by Trevor Harmon on 8/5/09.
  3. // Free for personal or commercial use, with or without modification.
  4. // No warranty is expressed or implied.
  5. // Extends the UIImage class to support resizing/cropping
  6. @interface UIImage (Resize)
  7. - (UIImage *)croppedImage:(CGRect)bounds;
  8. - (UIImage *)thumbnailImage:(NSInteger)thumbnailSize
  9. transparentBorder:(NSUInteger)borderSize
  10. cornerRadius:(NSUInteger)cornerRadius
  11. interpolationQuality:(CGInterpolationQuality)quality;
  12. - (UIImage *)resizedImage:(CGSize)newSize
  13. interpolationQuality:(CGInterpolationQuality)quality;
  14. - (UIImage *)resizedImageWithContentMode:(UIViewContentMode)contentMode
  15. bounds:(CGSize)bounds
  16. interpolationQuality:(CGInterpolationQuality)quality;
  17. @end