pylibheif 1.21.2__cp313-cp313-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- include/libheif/heif.h +41 -0
- include/libheif/heif_aux_images.h +182 -0
- include/libheif/heif_brands.h +376 -0
- include/libheif/heif_color.h +363 -0
- include/libheif/heif_context.h +329 -0
- include/libheif/heif_cxx.h +1390 -0
- include/libheif/heif_decoding.h +172 -0
- include/libheif/heif_encoding.h +395 -0
- include/libheif/heif_entity_groups.h +60 -0
- include/libheif/heif_error.h +304 -0
- include/libheif/heif_image.h +355 -0
- include/libheif/heif_image_handle.h +129 -0
- include/libheif/heif_items.h +260 -0
- include/libheif/heif_library.h +219 -0
- include/libheif/heif_metadata.h +136 -0
- include/libheif/heif_plugin.h +378 -0
- include/libheif/heif_properties.h +235 -0
- include/libheif/heif_regions.h +868 -0
- include/libheif/heif_security.h +107 -0
- include/libheif/heif_sequences.h +644 -0
- include/libheif/heif_tai_timestamps.h +202 -0
- include/libheif/heif_text.h +161 -0
- include/libheif/heif_tiling.h +137 -0
- include/libheif/heif_uncompressed.h +109 -0
- include/libheif/heif_version.h +38 -0
- lib/cmake/libheif/libheif-config-release.cmake +19 -0
- lib/cmake/libheif/libheif-config-version.cmake +83 -0
- lib/cmake/libheif/libheif-config.cmake +108 -0
- lib/libheif.a +0 -0
- lib/pkgconfig/libheif.pc +15 -0
- pylibheif-1.21.2.dist-info/METADATA +409 -0
- pylibheif-1.21.2.dist-info/RECORD +41 -0
- pylibheif-1.21.2.dist-info/WHEEL +5 -0
- pylibheif-1.21.2.dist-info/licenses/LICENSE +165 -0
- pylibheif.cpython-313-darwin.so +0 -0
- pylibheif.dylibs/libaom.3.13.1.dylib +0 -0
- pylibheif.dylibs/libdav1d.7.dylib +0 -0
- pylibheif.dylibs/libde265.0.dylib +0 -0
- pylibheif.dylibs/libopenjp2.2.5.4.dylib +0 -0
- pylibheif.dylibs/libvmaf.3.dylib +0 -0
- pylibheif.dylibs/libx265.215.dylib +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* HEIF codec.
|
|
3
|
+
* Copyright (c) 2017-2023 Dirk Farin <dirk.farin@gmail.com>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of libheif.
|
|
6
|
+
*
|
|
7
|
+
* libheif is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as
|
|
9
|
+
* published by the Free Software Foundation, either version 3 of
|
|
10
|
+
* the License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* libheif is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with libheif. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#ifndef LIBHEIF_HEIF_PROPERTIES_H
|
|
22
|
+
#define LIBHEIF_HEIF_PROPERTIES_H
|
|
23
|
+
|
|
24
|
+
#include "heif.h"
|
|
25
|
+
|
|
26
|
+
#ifdef __cplusplus
|
|
27
|
+
extern "C" {
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
// ------------------------- item properties -------------------------
|
|
31
|
+
|
|
32
|
+
typedef enum heif_item_property_type
|
|
33
|
+
{
|
|
34
|
+
// heif_item_property_unknown = -1,
|
|
35
|
+
heif_item_property_type_invalid = 0,
|
|
36
|
+
heif_item_property_type_user_description = heif_fourcc('u', 'd', 'e', 's'),
|
|
37
|
+
heif_item_property_type_transform_mirror = heif_fourcc('i', 'm', 'i', 'r'),
|
|
38
|
+
heif_item_property_type_transform_rotation = heif_fourcc('i', 'r', 'o', 't'),
|
|
39
|
+
heif_item_property_type_transform_crop = heif_fourcc('c', 'l', 'a', 'p'),
|
|
40
|
+
heif_item_property_type_image_size = heif_fourcc('i', 's', 'p', 'e'),
|
|
41
|
+
heif_item_property_type_uuid = heif_fourcc('u', 'u', 'i', 'd'),
|
|
42
|
+
heif_item_property_type_tai_clock_info = heif_fourcc('t', 'a', 'i', 'c'),
|
|
43
|
+
heif_item_property_type_tai_timestamp = heif_fourcc('i', 't', 'a', 'i'),
|
|
44
|
+
heif_item_property_type_extended_language = heif_fourcc('e', 'l', 'n', 'g')
|
|
45
|
+
} heif_item_property_type;
|
|
46
|
+
|
|
47
|
+
// Get the heif_property_id for a heif_item_id.
|
|
48
|
+
// You may specify which property 'type' you want to receive.
|
|
49
|
+
// If you specify 'heif_item_property_type_invalid', all properties associated to that item are returned.
|
|
50
|
+
// The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
|
|
51
|
+
// By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
|
|
52
|
+
LIBHEIF_API
|
|
53
|
+
int heif_item_get_properties_of_type(const heif_context* context,
|
|
54
|
+
heif_item_id id,
|
|
55
|
+
enum heif_item_property_type type,
|
|
56
|
+
heif_property_id* out_list,
|
|
57
|
+
int count);
|
|
58
|
+
|
|
59
|
+
// Returns all transformative properties in the correct order.
|
|
60
|
+
// This includes "irot", "imir", "clap".
|
|
61
|
+
// The number of properties is returned, which are not more than 'count' if (out_list != nullptr).
|
|
62
|
+
// By setting out_list==nullptr, you can query the number of properties, 'count' is ignored.
|
|
63
|
+
LIBHEIF_API
|
|
64
|
+
int heif_item_get_transformation_properties(const heif_context* context,
|
|
65
|
+
heif_item_id id,
|
|
66
|
+
heif_property_id* out_list,
|
|
67
|
+
int count);
|
|
68
|
+
|
|
69
|
+
LIBHEIF_API
|
|
70
|
+
enum heif_item_property_type heif_item_get_property_type(const heif_context* context,
|
|
71
|
+
heif_item_id id,
|
|
72
|
+
heif_property_id property_id);
|
|
73
|
+
|
|
74
|
+
// The strings are managed by libheif. They will be deleted in heif_property_user_description_release().
|
|
75
|
+
typedef struct heif_property_user_description
|
|
76
|
+
{
|
|
77
|
+
int version;
|
|
78
|
+
|
|
79
|
+
// version 1
|
|
80
|
+
|
|
81
|
+
const char* lang;
|
|
82
|
+
const char* name;
|
|
83
|
+
const char* description;
|
|
84
|
+
const char* tags;
|
|
85
|
+
} heif_property_user_description;
|
|
86
|
+
|
|
87
|
+
// Get the "udes" user description property content.
|
|
88
|
+
// Undefined strings are returned as empty strings.
|
|
89
|
+
LIBHEIF_API
|
|
90
|
+
heif_error heif_item_get_property_user_description(const heif_context* context,
|
|
91
|
+
heif_item_id itemId,
|
|
92
|
+
heif_property_id propertyId,
|
|
93
|
+
heif_property_user_description** out);
|
|
94
|
+
|
|
95
|
+
// Add a "udes" user description property to the item.
|
|
96
|
+
// If any string pointers are NULL, an empty string will be used instead.
|
|
97
|
+
LIBHEIF_API
|
|
98
|
+
heif_error heif_item_add_property_user_description(const heif_context* context,
|
|
99
|
+
heif_item_id itemId,
|
|
100
|
+
const heif_property_user_description* description,
|
|
101
|
+
heif_property_id* out_propertyId);
|
|
102
|
+
|
|
103
|
+
// Release all strings and the object itself.
|
|
104
|
+
// Only call for objects that you received from heif_item_get_property_user_description().
|
|
105
|
+
LIBHEIF_API
|
|
106
|
+
void heif_property_user_description_release(heif_property_user_description*);
|
|
107
|
+
|
|
108
|
+
typedef enum heif_transform_mirror_direction
|
|
109
|
+
{
|
|
110
|
+
heif_transform_mirror_direction_invalid = -1,
|
|
111
|
+
heif_transform_mirror_direction_vertical = 0, // flip image vertically
|
|
112
|
+
heif_transform_mirror_direction_horizontal = 1 // flip image horizontally
|
|
113
|
+
} heif_transform_mirror_direction;
|
|
114
|
+
|
|
115
|
+
// Will return 'heif_transform_mirror_direction_invalid' in case of error.
|
|
116
|
+
// If 'propertyId==0', it returns the first imir property found.
|
|
117
|
+
LIBHEIF_API
|
|
118
|
+
enum heif_transform_mirror_direction heif_item_get_property_transform_mirror(const heif_context* context,
|
|
119
|
+
heif_item_id itemId,
|
|
120
|
+
heif_property_id propertyId);
|
|
121
|
+
|
|
122
|
+
// Returns only 0, 90, 180, or 270 angle values.
|
|
123
|
+
// Returns -1 in case of error (but it will only return an error in case of wrong usage).
|
|
124
|
+
// If 'propertyId==0', it returns the first irot property found.
|
|
125
|
+
LIBHEIF_API
|
|
126
|
+
int heif_item_get_property_transform_rotation_ccw(const heif_context* context,
|
|
127
|
+
heif_item_id itemId,
|
|
128
|
+
heif_property_id propertyId);
|
|
129
|
+
|
|
130
|
+
// Returns the number of pixels that should be removed from the four edges.
|
|
131
|
+
// Because of the way this data is stored, you have to pass the image size at the moment of the crop operation
|
|
132
|
+
// to compute the cropped border sizes.
|
|
133
|
+
// If 'propertyId==0', it returns the first clap property found.
|
|
134
|
+
LIBHEIF_API
|
|
135
|
+
void heif_item_get_property_transform_crop_borders(const heif_context* context,
|
|
136
|
+
heif_item_id itemId,
|
|
137
|
+
heif_property_id propertyId,
|
|
138
|
+
int image_width, int image_height,
|
|
139
|
+
int* left, int* top, int* right, int* bottom);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @param context The heif_context for the file
|
|
143
|
+
* @param itemId The image item id to which this property belongs.
|
|
144
|
+
* @param fourcc_type The short four-cc type of the property to add.
|
|
145
|
+
* @param uuid_type If fourcc_type=='uuid', this should point to a 16-byte UUID type. It is ignored otherwise and can be NULL.
|
|
146
|
+
* @param data Data to insert for this property (including a full-box header, if required for this box).
|
|
147
|
+
* @param size Length of data in bytes.
|
|
148
|
+
* @param is_essential Whether this property is essential (boolean).
|
|
149
|
+
* @param out_propertyId Outputs the id of the inserted property. Can be NULL.
|
|
150
|
+
*/
|
|
151
|
+
LIBHEIF_API
|
|
152
|
+
heif_error heif_item_add_raw_property(const heif_context* context,
|
|
153
|
+
heif_item_id itemId,
|
|
154
|
+
uint32_t fourcc_type,
|
|
155
|
+
const uint8_t* uuid_type,
|
|
156
|
+
const uint8_t* data, size_t size,
|
|
157
|
+
int is_essential,
|
|
158
|
+
heif_property_id* out_propertyId);
|
|
159
|
+
|
|
160
|
+
LIBHEIF_API
|
|
161
|
+
heif_error heif_item_get_property_raw_size(const heif_context* context,
|
|
162
|
+
heif_item_id itemId,
|
|
163
|
+
heif_property_id propertyId,
|
|
164
|
+
size_t* out_size);
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @param out_data User-supplied array to write the property data to. The required size of the output array is given by heif_item_get_property_raw_size().
|
|
168
|
+
*/
|
|
169
|
+
LIBHEIF_API
|
|
170
|
+
heif_error heif_item_get_property_raw_data(const heif_context* context,
|
|
171
|
+
heif_item_id itemId,
|
|
172
|
+
heif_property_id propertyId,
|
|
173
|
+
uint8_t* out_data);
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Get the extended type for an extended "uuid" box.
|
|
177
|
+
*
|
|
178
|
+
* This provides the UUID for the extended box.
|
|
179
|
+
*
|
|
180
|
+
* This method should only be called on properties of type `heif_item_property_type_uuid`.
|
|
181
|
+
*
|
|
182
|
+
* @param context the heif_context containing the HEIF file
|
|
183
|
+
* @param itemId the image item id to which this property belongs.
|
|
184
|
+
* @param propertyId the property index (1-based) to get the extended type for
|
|
185
|
+
* @param out_extended_type output of the call, must be a pointer to at least 16-bytes.
|
|
186
|
+
* @return heif_error_success or an error indicating the failure
|
|
187
|
+
*/
|
|
188
|
+
LIBHEIF_API
|
|
189
|
+
heif_error heif_item_get_property_uuid_type(const heif_context* context,
|
|
190
|
+
heif_item_id itemId,
|
|
191
|
+
heif_property_id propertyId,
|
|
192
|
+
uint8_t out_extended_type[16]);
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
// ------------------------- intrinsic and extrinsic matrices -------------------------
|
|
196
|
+
|
|
197
|
+
typedef struct heif_camera_intrinsic_matrix
|
|
198
|
+
{
|
|
199
|
+
double focal_length_x;
|
|
200
|
+
double focal_length_y;
|
|
201
|
+
double principal_point_x;
|
|
202
|
+
double principal_point_y;
|
|
203
|
+
double skew;
|
|
204
|
+
} heif_camera_intrinsic_matrix;
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
LIBHEIF_API
|
|
208
|
+
int heif_image_handle_has_camera_intrinsic_matrix(const heif_image_handle* handle);
|
|
209
|
+
|
|
210
|
+
LIBHEIF_API
|
|
211
|
+
heif_error heif_image_handle_get_camera_intrinsic_matrix(const heif_image_handle* handle,
|
|
212
|
+
heif_camera_intrinsic_matrix* out_matrix);
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
typedef struct heif_camera_extrinsic_matrix heif_camera_extrinsic_matrix;
|
|
216
|
+
|
|
217
|
+
LIBHEIF_API
|
|
218
|
+
int heif_image_handle_has_camera_extrinsic_matrix(const heif_image_handle* handle);
|
|
219
|
+
|
|
220
|
+
LIBHEIF_API
|
|
221
|
+
heif_error heif_image_handle_get_camera_extrinsic_matrix(const heif_image_handle* handle,
|
|
222
|
+
heif_camera_extrinsic_matrix** out_matrix);
|
|
223
|
+
|
|
224
|
+
LIBHEIF_API
|
|
225
|
+
void heif_camera_extrinsic_matrix_release(heif_camera_extrinsic_matrix*);
|
|
226
|
+
|
|
227
|
+
LIBHEIF_API
|
|
228
|
+
heif_error heif_camera_extrinsic_matrix_get_rotation_matrix(const heif_camera_extrinsic_matrix*,
|
|
229
|
+
double* out_matrix_row_major);
|
|
230
|
+
|
|
231
|
+
#ifdef __cplusplus
|
|
232
|
+
}
|
|
233
|
+
#endif
|
|
234
|
+
|
|
235
|
+
#endif
|