Write image to file
ret=imwrite(im, filename)
im
can be an M-by-N (greyscale image) or M-by-N-by-3 (color image) matrix.
If im
is not of class uint8, imwrite
will convert the datatype before writing using im2uint8(im)
.ret
will be 1.imwrite
writes a matrix into a image file. The format of the file is inferred from the extension in the filename
parameter. Currently the following file formats are supported:
im=rand(200,300); ret = imwrite(im, 'rand.png'); | ![]() | ![]() |
Images with a palette are not supported.
http://sivp.sf.net