diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-10-20 20:17:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-10-20 20:17:27 +0400 |
commit | 46deddcc62784dab47b1f14dda0d802f5f341b18 (patch) | |
tree | e3542a1b2d10f1c77e4ac5f7078f485d5b4e1006 /source/blender/imbuf/intern/thumbs.c | |
parent | e5a9e0b12a6d6aa334561edaf8a839f3f1a8d7d4 (diff) |
Image Stamping patch by Diego (and peach request)- stamps image info into metadata and optionally
draws into the
frame.
This patch includes some changes I made...
* use blenders bitmap fonts (rather then own fonts)
* select font size
* user interface layout changes
* Marker as another image stamp option
Also added some new API calls
BMF_GetFontHeight(font);
BMF_DrawStringBuf(...); - so we can draw text into an imbuf's image buffer.
get_frame_marker(frame) - get the last marker from the frame.
IMB_rectfill_area(...) - fill in an image buffer with a rectangle area of color.
TODO - draw stamp info in 3d view, at the moment it just displays in the animation.
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 493b0968f55..131d2ef38f7 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -281,7 +281,7 @@ ImBuf* IMB_thumb_create(const char* dir, const char* file, ThumbSize size, Thumb if (THB_SOURCE_IMAGE == source) { BLI_getwdN(wdir); chdir(dir); - img = IMB_loadiffname(file, IB_rect); + img = IMB_loadiffname(file, IB_rect | IB_imginfo); if (img != NULL) { stat(file, &info); sprintf(mtime, "%ld", info.st_mtime); @@ -324,13 +324,13 @@ ImBuf* IMB_thumb_create(const char* dir, const char* file, ThumbSize size, Thumb IMB_scaleImBuf(img, ex, ey); } sprintf(desc, "Thumbnail for %s", uri); - IMB_imginfo_add_field(img, "Description", desc); - IMB_imginfo_add_field(img, "Software", "Blender"); - IMB_imginfo_add_field(img, "Thumb::URI", uri); - IMB_imginfo_add_field(img, "Thumb::MTime", mtime); + IMB_imginfo_change_field(img, "Description", desc); + IMB_imginfo_change_field(img, "Software", "Blender"); + IMB_imginfo_change_field(img, "Thumb::URI", uri); + IMB_imginfo_change_field(img, "Thumb::MTime", mtime); if (THB_SOURCE_IMAGE == source) { - IMB_imginfo_add_field(img, "Thumb::Image::Width", cwidth); - IMB_imginfo_add_field(img, "Thumb::Image::Height", cheight); + IMB_imginfo_change_field(img, "Thumb::Image::Width", cwidth); + IMB_imginfo_change_field(img, "Thumb::Image::Height", cheight); } img->ftype = PNG; img->depth = 32; |