This repository has been archived by the owner on Feb 5, 2021. It is now read-only.
forked from jofell/Photon---iPhoto-Blog-Export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExportImageProtocol.h
executable file
·133 lines (114 loc) · 4.38 KB
/
ExportImageProtocol.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
File: ExportImageProtocol.h
Contains: iPhoto Plug-ins interfaces: Protocol for image exporting
Version: Technology: iPhoto
Release: 1.0
Copyright: © 2002-2007 by Apple Inc. All rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
typedef enum
{
EQualityLow,
EQualityMed,
EQualityHigh,
EQualityMax
} ExportQuality;
typedef enum
{
EMNone, // 0000
EMEXIF, // 0001
EMIPTC, // 0010
EMBoth // 0011
} ExportMetadata;
typedef struct
{
OSType format;
ExportQuality quality;
float rotation;
unsigned width;
unsigned height;
ExportMetadata metadata;
} ImageExportOptions;
//exif metadata access keys
#define kIPExifDateDigitized @"DateDigitized"
#define kIPExifCameraModel @"CameraModel"
#define kIPExifShutter @"Shutter"
#define kIPExifAperture @"Aperture"
#define kIPExifMaxAperture @"MaxAperture"
#define kIPExifExposureBias @"ExposureBias"
#define kIPExifExposure @"Exposure"
#define kIPExifExposureIndex @"ExposureIndex"
#define kIPExifFocalLength @"FocalLength"
#define kIPExifDistance @"Distance"
#define kIPExifSensing @"Sensing"
#define kIPExifLightSource @"LightSource"
#define kIPExifFlash @"Flash"
#define kIPExifMetering @"Metering"
#define kIPExifBrightness @"Brightness"
#define kIPExifISOSpeed @"ISOSpeed"
//tiff metadata access keys
#define kIPTiffImageWidth @"ImageWidth"
#define kIPTiffImageHeight @"ImageHeight"
#define kIPTiffOriginalDate @"OriginalDate"
#define kIPTiffDigitizedDate @"DigitizedDate"
#define kIPTiffFileName @"FileName"
#define kIPTiffFileSize @"FileSize"
#define kIPTiffModifiedDate @"ModifiedDate"
#define kIPTiffImportedDate @"ImportedDate"
#define kIPTiffCameraMaker @"CameraMaker"
#define kIPTiffCameraModel @"CameraModel"
#define kIPTiffSoftware @"Software"
@protocol ExportImageProtocol
//------------------------------------------------------------------------------
// Access to images
//------------------------------------------------------------------------------
- (unsigned)imageCount;
- (NSSize)imageSizeAtIndex:(unsigned)index;
- (OSType)imageFormatAtIndex:(unsigned)index;
- (OSType)originalImageFormatAtIndex:(unsigned)index;
- (BOOL)originalIsRawAtIndex:(unsigned)index;
- (BOOL)originalIsMovieAtIndex:(unsigned)index;
- (NSString *)imageTitleAtIndex:(unsigned)index;
- (NSString *)imageCommentsAtIndex:(unsigned)index;
- (float)imageRotationAtIndex:(unsigned)index;
- (NSString *)imagePathAtIndex:(unsigned)index;
- (NSString *)sourcePathAtIndex:(unsigned)index;
- (NSString *)thumbnailPathAtIndex:(unsigned)index;
- (NSString *)imageFileNameAtIndex:(unsigned)index;
- (BOOL)imageIsEditedAtIndex:(unsigned)index;
- (BOOL)imageIsPortraitAtIndex:(unsigned)index;
- (float)imageAspectRatioAtIndex:(unsigned)index;
- (unsigned long long)imageFileSizeAtIndex:(unsigned)index;
- (NSDate *)imageDateAtIndex:(unsigned)index;
- (int)imageRatingAtIndex:(unsigned)index;
- (NSDictionary *)imageTiffPropertiesAtIndex:(unsigned)index;
- (NSDictionary *)imageExifPropertiesAtIndex:(unsigned)index;
- (NSArray *)imageKeywordsAtIndex:(unsigned)index;
- (NSArray *)albumsOfImageAtIndex:(unsigned)index;
- (NSString *)getExtensionForImageFormat:(OSType)format;
- (OSType)getImageFormatForExtension:(NSString *)extension;
//------------------------------------------------------------------------------
// Access to albums
//------------------------------------------------------------------------------
- (unsigned)albumCount; //total number of albums
- (NSString *)albumNameAtIndex:(unsigned)index; //name of album at index
- (NSString *)albumMusicPathAtIndex:(unsigned)index;
- (NSString *)albumCommentsAtIndex:(unsigned)index;
- (unsigned)positionOfImageAtIndex:(unsigned)index inAlbum:(unsigned)album;
//------------------------------------------------------------------------------
// Access to export controller's GUI
//------------------------------------------------------------------------------
- (id)window;
- (void)enableControls;
- (void)disableControls;
- (void)clickExport;
- (void)startExport;
- (void)cancelExportBeforeBeginning;
- (NSString *)directoryPath;
- (unsigned)sessionID;
- (BOOL)exportImageAtIndex:(unsigned)index dest:(NSString *)dest options:(ImageExportOptions *)options;
- (NSSize)lastExportedImageSize;
//------------------------------------------------------------------------------
@end