Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 42 lines (35 sloc) 1.945 kb
297ae85 initial commit
Chris authored
1 // -----------------------------------------------------------------------------------
2 // NSImage-Resolution.h
3 // -----------------------------------------------------------------------------------
4 // Created by Jeff LaMarche on Sun May 12 2002.
5 // �2002 Naked Software. All rights reserved.
6 // -----------------------------------------------------------------------------------
7 // THIS SOURCE CODE IS PROVIDED AS-IS WITH NO WARRANTY OF ANY KIND
8 // -----------------------------------------------------------------------------------
9 // You may use and redistribute this source code without limitation
10 // -----------------------------------------------------------------------------------
11 #import <UIKit/UIKit.h>
12
13 /*!
14 @header UIImage-Resolution.h
15
16 This category adds two instance methods to NSImage that operate on the resolution of an NSImage with at least one NSBitmapImageRep
17 */
18
19 /*!
20 @category NSImage(Normalize)
21 @discussion This category adds two instance methods that operate on the resolution of an NSImage with at least one NSBitmapImageRep
22 */
23 @interface UIImage (normalize)
24
25 /*!
26 @method normalizeSize
27 @abstract Normalize the resolution to 72 dpi in lossless fashion so that the image displays at full size onscreen.
28 @result NSImage with the exact same data as the instance it is called on <i>except</i> that the resolution pixelHeight will be the same as the height and the pixelWidth will be the same as the width.
29 */
30 - (UIImage *) normalizeSize;
31
32 /*!
33 @method setDPI:
34 @abstract Allows you to adjust (in a lossless fashion) the resolution of the images NSBitmapImageRep (if it has one) to a given
35 number of points per inch.
36 @param dpi Integer value representing the desired horizontal and vertical pixels per inch.
37 @result Self with the data unaltered except for the height and width (pixelHeight and pixelWidth remain unchanged) of the first NSBitmapRep the image contains.
38 */
39 - (UIImage *) setDPI:(int)dpi;
40 @end
41
Something went wrong with that request. Please try again.