-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
DTImage+HTML.h
49 lines (34 loc) · 989 Bytes
/
DTImage+HTML.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// DTImage+HTML.h
// DTCoreText
//
// Created by Oliver Drobnik on 1/9/11.
// Copyright 2011 Drobnik.com. All rights reserved.
//
#import "DTCompatibility.h"
#if TARGET_OS_IPHONE
#import <UIKit/UIImage.h>
/**
Category used to have the same method available for unit testing on Mac on iOS.
*/
@interface UIImage (HTML)
/**
Retrieve the NSData representation of a UIImage. Used to encode UIImages in DTTextAttachments.
@returns The NSData representation of the UIImage instance receiving this message. Convenience method for UIImagePNGRepresentation().
*/
- (NSData *)dataForPNGRepresentation;
@end
#endif
#if TARGET_OS_OSX
#import <AppKit/NSImage.h>
/**
Category used to have the same method available for unit testing on Mac on iOS.
*/
@interface NSImage (HTML)
/**
Retrieve the NSData representation of a NSImage.
@returns The NSData representation of the NSImage instance receiving this message.
*/
- (NSData *)dataForPNGRepresentation;
@end
#endif