<< imread | Input output | Image display >>

scicv >> Input output > imwrite

# imwrite

Save an image

###

    imwrite(filename, img[, params])

### Parameters

filename

  Path of file.

img

  Image to be saved (Mat).

params

  Parameters specific to the format.

### Description

`imwrite` saves an image to the specified file.

### Examples

    scicv_Init();

    // Load a PNG image and save it to JPG
    img = imread(getSampleImage("puffin.png"));
    imwrite(fullfile(TMPDIR, "puffin.jpg"), img);

    delete_Mat(img);

### See also

- imread

Report an issue
<< imread | Input output | Image display >>