Mercurial > forge
changeset 3058:a5f4c46c767a octave-forge
Print an error if more than 256 colours used in the indexed map.
author | pkienzle |
---|---|
date | Tue, 06 Feb 2007 01:03:04 +0000 |
parents | 76f0dfa31064 |
children | ea1e1d4a99ed |
files | main/image/inst/bmpwrite.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main/image/inst/bmpwrite.m Mon Feb 05 20:53:10 2007 +0000 +++ b/main/image/inst/bmpwrite.m Tue Feb 06 01:03:04 2007 +0000 @@ -55,6 +55,10 @@ endfunction function bmpwrite_indexed(x,map,file) + + if rows(map) > 256, + error("bmpwrite supports at most 256 color indexed images"); + endif [h,w] = size(x); padw = ceil(w/4)*4-w; header = 14+40+4*rows(map);