diff options
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 10 | ||||
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/metadata.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/png.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs_blend.c | 10 |
5 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index d825b20f5f2..9b01ea0840f 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -1506,3 +1506,13 @@ int IMB_anim_get_preseek(struct anim *anim) { return anim->preseek; } + +int IMB_anim_get_image_width(struct anim *anim) +{ + return anim->x; +} + +int IMB_anim_get_image_height(struct anim *anim) +{ + return anim->y; +} diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 93cdbbb1407..7d4797def8f 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -33,6 +33,8 @@ #include "BKE_idprop.h" +#include "DNA_ID.h" /* ID property definitions. */ + #include "IMB_filetype.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/imbuf/intern/metadata.c b/source/blender/imbuf/intern/metadata.c index 28f09c38a96..d8abd3411cb 100644 --- a/source/blender/imbuf/intern/metadata.c +++ b/source/blender/imbuf/intern/metadata.c @@ -29,6 +29,8 @@ #include "BKE_idprop.h" +#include "DNA_ID.h" /* ID property definitions. */ + #include "MEM_guardedalloc.h" #include "IMB_imbuf.h" diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 60fc2ac0867..561a833803d 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -32,6 +32,8 @@ #include "BKE_global.h" #include "BKE_idprop.h" +#include "DNA_ID.h" /* ID property definitions. */ + #include "MEM_guardedalloc.h" #include "IMB_imbuf.h" diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c index d5ded02be62..486db07597f 100644 --- a/source/blender/imbuf/intern/thumbs_blend.c +++ b/source/blender/imbuf/intern/thumbs_blend.c @@ -78,15 +78,7 @@ ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const if (STREQ(blockname, blen_id)) { if (img) { - unsigned int w = img->w[ICON_SIZE_PREVIEW]; - unsigned int h = img->h[ICON_SIZE_PREVIEW]; - unsigned int *rect = img->rect[ICON_SIZE_PREVIEW]; - - if (w > 0 && h > 0 && rect) { - /* first allocate imbuf for copying preview into it */ - ima = IMB_allocImBuf(w, h, 32, IB_rect); - memcpy(ima->rect, rect, w * h * sizeof(unsigned int)); - } + ima = BKE_previewimg_to_imbuf(img, ICON_SIZE_PREVIEW); } break; } |