美文网首页
2022-01-07 生成图像

2022-01-07 生成图像

作者: 暗夜晴空 | 来源:发表于2022-01-07 11:37 被阅读0次

*区域转图像

gen_rectangle1 (Rectangle, 500, 500, 800, 800)

*前景色-区域颜色  *背景色-图像颜色

region_to_bin (Rectangle, BinImage, 255, 100, 2000, 2000)

write_image (BinImage, 'bmp', 0, 'D:/Image/self/A.bmp')

*生成灰度图像

gen_image_const (Image, 'byte', 2000, 2000)

paint_region (Rectangle, Image, ImageResult, 100, 'fill')

write_image (ImageResult, 'bmp', 0, 'D:/Image/self/B.bmp')

*生成颜色图像

gen_image_proto (Image, ImageR, 0)

gen_image_proto (Image, ImageG, 255)

gen_image_proto (Image, ImageB, 0)

compose3 (ImageR, ImageG, ImageB, MultiChannelImage)

write_image (MultiChannelImage, 'bmp', 0, 'D:/Image/self/C.bmp')

相关文章

网友评论

      本文标题:2022-01-07 生成图像

      本文链接:https://www.haomeiwen.com/subject/jgrjcrtx.html