[feat] add image_create function by matlab and python
This commit is contained in:
parent
807a79f19c
commit
0cc066e120
5
matlab/image_create.m
Normal file
5
matlab/image_create.m
Normal file
@ -0,0 +1,5 @@
|
||||
% 创建一个320x240的图像
|
||||
img = uint8(255 * ones(240, 320, 3)); % 创建一个白色图像
|
||||
|
||||
% 保存为JPEG格式,设置压缩质量为50
|
||||
imwrite(img, 'output.jpg', 'JPEG', 'Quality', 50);
|
||||
7
python/image_create/image_create.py
Normal file
7
python/image_create/image_create.py
Normal file
@ -0,0 +1,7 @@
|
||||
from PIL import Image
|
||||
|
||||
# 创建一个320x240的RGB图像,填充为白色
|
||||
image = Image.new('RGB', (320, 240), (255, 255, 255))
|
||||
|
||||
# 保存为JPEG格式,设置压缩质量为50
|
||||
image.save('output.jpg', 'JPEG', quality=50)
|
||||
Loading…
Reference in New Issue
Block a user