Mercurial > hg > smallbox
annotate DL/RLS-DLA/private/thumbwrite.m @ 65:55faa9b5d1ac
(none)
author | idamnjanovic |
---|---|
date | Wed, 16 Mar 2011 13:41:02 +0000 |
parents | ad36f80e2ccf |
children |
rev | line source |
---|---|
idamnjanovic@60 | 1 function thumbwrite(data,name,opts) |
idamnjanovic@60 | 2 |
idamnjanovic@60 | 3 |
idamnjanovic@60 | 4 % Copyright 2008, Ewout van den Berg and Michael P. Friedlander |
idamnjanovic@60 | 5 % http://www.cs.ubc.ca/labs/scl/sparco |
idamnjanovic@60 | 6 % $Id: thumbwrite.m 1040 2008-06-26 20:29:02Z ewout78 $ |
idamnjanovic@60 | 7 |
idamnjanovic@60 | 8 % |
idamnjanovic@60 | 9 % data Thumbnail data in range 0-1 |
idamnjanovic@60 | 10 % name Name of file (no extension) |
idamnjanovic@60 | 11 % opts |
idamnjanovic@60 | 12 % .thumbtype Type of image (png, eps, ps, ...) |
idamnjanovic@60 | 13 % .thumbdir Output directory |
idamnjanovic@60 | 14 % |
idamnjanovic@60 | 15 |
idamnjanovic@60 | 16 [type,ext] = getFigureExt(opts.thumbtype); |
idamnjanovic@60 | 17 data = round(data * 255) / 255; |
idamnjanovic@60 | 18 imwrite(data,[opts.thumbpath,name,'.',ext],type); |