diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-12 19:15:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-12 19:15:02 +0400 |
commit | 26f0f25c5a5a36874b35861da02a68541eda8941 (patch) | |
tree | 2c962959e66c2832f95bbbc09b064983d2a9b54f /source/blender/imbuf | |
parent | 47f319eb6e386e5f03c09de4eafe0c2fe4574407 (diff) |
Fix #23188: libpng error: Image width or height is zero in IHDR.
The file thumbnail generator would write 0x0 size png's to the .thumbnails/fail
folder. However libpng throws an error when doing this. Instead we now write 1x1
png's, which nautilus seems to be doing as well. The content shouldn't matter
anyway since we won't use it.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index a2880b98856..f3415d44ecb 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -264,7 +264,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im tsize = 256; break; case THB_FAIL: - tsize = 0; + tsize = 1; break; default: return 0; /* unknown size */ @@ -280,7 +280,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im return NULL; } if (size == THB_FAIL) { - img = IMB_allocImBuf(0,0,32, IB_rect | IB_metadata, 0); + img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata, 0); if (!img) return 0; } else { if (THB_SOURCE_IMAGE == source || THB_SOURCE_BLEND == source) { |