diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-01 17:06:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-01 17:06:13 +0400 |
commit | 16ca0163d8a1ebac2746ebf80bfcf464fc0c8883 (patch) | |
tree | 58b9780dea1375946a6610b576323b5acc103fac /source/blender | |
parent | 75e67144ab962c7882da594c4a7c6d8a7cf70b74 (diff) |
passepartout overlay wasnt written into thumbnails
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/imbuf/IMB_thumbs.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs_blend.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 |
4 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h index 68aa3c64299..9248b768cb6 100644 --- a/source/blender/imbuf/IMB_thumbs.h +++ b/source/blender/imbuf/IMB_thumbs.h @@ -73,7 +73,7 @@ void IMB_thumb_makedirs(); /* special function for loading a thumbnail embedded into a blend file */ ImBuf *IMB_loadblend_thumb(const char *path); -void IMB_overlayblend_thumb(int *thumb, int width, int height, float aspect); +void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float aspect); #endif /* _IMB_THUMBS_H */ diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 1cdeb602f0f..234c8837b35 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -347,9 +347,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im if (IMB_saveiff(img, temp, IB_rect | IB_metadata)) { #ifndef WIN32 chmod(temp, S_IRUSR | S_IWUSR); -#endif - printf("Saving: %s\n", tpath); - +#endif BLI_rename(temp, tpath); } diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c index 9df27f6f969..4ad983cdff9 100644 --- a/source/blender/imbuf/intern/thumbs_blend.c +++ b/source/blender/imbuf/intern/thumbs_blend.c @@ -131,7 +131,7 @@ thumb_error: /* add a fake passepartout overlay to a byte buffer, use for blend file thumbnails */ #define MARGIN 2 -void IMB_overlayblend_thumb(int *thumb, int width, int height, float aspect) +void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float aspect) { unsigned char *px= (unsigned char *)thumb; int margin_l = MARGIN; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index aa217517907..44768116c7c 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -510,6 +510,9 @@ static ImBuf *blend_file_thumb(const char *path, Scene *scene, int **thumb_pt) /* dirty oversampling */ IMB_scaleImBuf(ibuf, BLEN_THUMB_SIZE, BLEN_THUMB_SIZE); + + /* add pretty overlay */ + IMB_overlayblend_thumb(ibuf->rect, ibuf->x, ibuf->y, aspect); /* first write into thumb buffer */ thumb= MEM_mallocN(((2 + (BLEN_THUMB_SIZE * BLEN_THUMB_SIZE))) * sizeof(int), "write_file thumb"); @@ -518,9 +521,6 @@ static ImBuf *blend_file_thumb(const char *path, Scene *scene, int **thumb_pt) thumb[1] = BLEN_THUMB_SIZE; memcpy(thumb + 2, ibuf->rect, BLEN_THUMB_SIZE * BLEN_THUMB_SIZE * sizeof(int)); - - /* add pretty overlay */ - IMB_overlayblend_thumb(thumb + 2, BLEN_THUMB_SIZE, BLEN_THUMB_SIZE, aspect); } else { /* '*thumb_pt' needs to stay NULL to prevent a bad thumbnail from being handled */ |