demo/matlab/image_create.m

6 lines
201 B
Matlab
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% 创建一个320x240的图像
img = uint8(255 * ones(240, 320, 3)); % 创建一个白色图像
% 保存为JPEG格式设置压缩质量为50
imwrite(img, 'output.jpg', 'JPEG', 'Quality', 50);