This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
JPImagePickerController/JPImagePickerDemo/Classes/UIImageResizing.h
2009-11-11 15:41:15 +01:00

26 lines
831 B
Objective-C

//
// UIImageResizing.h
// JPImagePickerController
//
// Created by Jeena on 07.11.09.
// Copyright 2009 Jeena Paradies. All rights reserved.
//
// Most of this code is from http://stackoverflow.com/questions/603907/uiimage-resize-then-crop
#import <Foundation/Foundation.h>
@interface UIImage (Resize)
+ (UIImage *)image:(UIImage *)sourceImage scaleAndCroppForSize:(CGSize)targetSize;
- (UIImage *)scaleAndCropToSize:(CGSize)newSize;
- (UIImage *)scaleAndCropToSize:(CGSize)targetSize onlyIfNeeded:(BOOL)onlyIfNeeded;
+ (UIImage *)image:(UIImage *)image scaleToSize:(CGSize)newSize;
- (UIImage *)scaleToSize:(CGSize)newSize;
- (UIImage *)scaleToSize:(CGSize)targetSize onlyIfNeeded:(BOOL)onlyIfNeeded;
+ (BOOL)image:(UIImage *)sourceImage needsToScale:(CGSize)targetSize;
- (BOOL)needsToScale:(CGSize)targetSize;
@end