LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 /* returns a new image or NULL if it can't load */ | 158 /* returns a new image or NULL if it can't load */ |
159 struct Image *BKE_image_load(struct Main *bmain, const char *filepath); | 159 struct Image *BKE_image_load(struct Main *bmain, const char *filepath); |
160 /* returns existing Image when filename/type is same (frame optional) */ | 160 /* returns existing Image when filename/type is same (frame optional) */ |
161 struct Image *BKE_image_load_exists(const char *filepath); | 161 struct Image *BKE_image_load_exists(const char *filepath); |
162 | 162 |
163 /* adds image, adds ibuf, generates color or pattern */ | 163 /* adds image, adds ibuf, generates color or pattern */ |
164 struct Image *BKE_image_add_generated(struct Main *bmain, unsigned int width, un
signed int height, const char *name, int depth, int floatbuf, short gen_type, co
nst float color[4]); | 164 struct Image *BKE_image_add_generated(struct Main *bmain, unsigned int width, un
signed int height, const char *name, int depth, int floatbuf, short gen_type, co
nst float color[4]); |
165 /* adds image from imbuf, owns imbuf */ | 165 /* adds image from imbuf, owns imbuf */ |
166 struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf); | 166 struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf); |
167 | 167 |
168 /* for reload, refresh, pack */ | |
169 void BKE_image_signal(struct Image *ima, struct ImageUser *iuser, int signal); | |
170 | |
171 void BKE_image_walk_all_users(const struct Main *mainp, void *customdata, | |
172 void callback(struct Image *ima, struct ImageUser
*iuser, void *customdata)); | |
173 | |
174 /* ensures an Image exists for viewing nodes or render */ | |
175 struct Image *BKE_image_verify_viewer(int type, const char *name); | |
176 | |
177 /* force an ImBuf to become part of Image */ | |
178 void BKE_image_assign_ibuf(struct Image *ima, struct ImBuf *ibuf); | |
179 | |
180 /* called on frame change or before render */ | |
181 void BKE_image_user_frame_calc(struct ImageUser *iuser, int cfra, int fieldnr); | |
182 void BKE_image_user_check_frame_calc(struct ImageUser *iuser, int cfra, int fiel
dnr); | |
183 int BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, int field
nr, short *r_is_in_range); | |
184 void BKE_image_user_file_path(struct ImageUser *iuser, struct Image *ima, char *
path);· | |
185 void BKE_image_update_frame(const struct Main *bmain, int cfra); | |
186 | |
187 /* sets index offset for multilayer files */ | |
188 struct RenderPass *BKE_image_multilayer_index(struct RenderResult *rr, struct Im
ageUser *iuser); | |
189 | |
190 /* for multilayer images as well as for render-viewer */ | |
191 struct RenderResult *BKE_image_acquire_renderresult(struct Scene *scene, struct
Image *ima); | |
192 void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima); | |
193 | |
194 /* for multiple slot render, call this before render */ | |
195 void BKE_image_backup_render(struct Scene *scene, struct Image *ima); | |
196 ········ | |
197 /* goes over all textures that use images */ | |
198 void BKE_image_free_all_textures(void); | |
199 | |
200 /* does one image! */ | |
201 void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame); | |
202 | |
203 /* does all images with type MOVIE or SEQUENCE */ | |
204 void BKE_image_all_free_anim_ibufs(int except_frame); | |
205 | |
206 void BKE_image_memorypack(struct Image *ima); | |
207 | |
208 /* prints memory statistics for images */ | |
209 void BKE_image_print_memlist(void); | |
210 | |
211 /* empty image block, of similar type and filename */ | |
212 struct Image *BKE_image_copy(struct Main *bmain, struct Image *ima); | |
213 | |
214 /* merge source into dest, and free source */ | 168 /* merge source into dest, and free source */ |
215 void BKE_image_merge(struct Image *dest, struct Image *source); | 169 void BKE_image_merge(struct Image *dest, struct Image *source); |
216 | 170 |
217 /* scale the image */ | |
218 int BKE_image_scale(struct Image *image, int width, int height); | |
219 | |
220 /* check if texture has alpha (depth=32) */ | |
221 int BKE_image_has_alpha(struct Image *image); | |
222 | |
223 void BKE_image_get_size(struct Image *image, struct ImageUser *iuser, int *width
, int *height); | |
224 void BKE_image_get_size_fl(struct Image *image, struct ImageUser *iuser, float s
ize[2]); | |
225 void BKE_image_get_aspect(struct Image *image, float *aspx, float *aspy); | |
226 | |
227 /* image_gen.c */ | 171 /* image_gen.c */ |
228 void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width,
int height, const float color[4]); | 172 void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width,
int height, float color[4]); |
229 void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int heig
ht, int width); | 173 void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int heig
ht, int width); |
230 void BKE_image_buf_fill_checker_color(unsigned char *rect, float *rect_float, in
t height, int width); | |
231 | |
232 /* Cycles hookup */ | |
233 unsigned char *BKE_image_get_pixels_for_frame(struct Image *image, int frame); | |
234 float *BKE_image_get_float_pixels_for_frame(struct Image *image, int frame); | |
235 | |
236 /* Guess offset for the first frame in the sequence */ | |
237 int BKE_image_sequence_guess_offset(struct Image *image); | |
238 #ifdef __cplusplus | |
239 } | |
240 #endif | |
241 | |
242 #endif | |
243 | |
LEFT | RIGHT |