加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

彩色照片转换为黑白照片(Color image converted to black and wh

发布时间:2020-12-14 06:30:48 所属栏目:Java 来源:网络整理
导读:This blog will be talking about the color image converted to black and white picture. The project structure as follow: The run result: File input = File out = } String ORGINAL_IMAGE = "src/com/b510/image/resources/orginal_image.jpg" String

This blog will be talking about the color image converted to black and white picture.

The project structure as follow:

The run result:

File input = File out = }

String ORGINAL_IMAGE = "src/com/b510/image/resources/orginal_image.jpg" String PROCESSED_IMAGE = "src/com/b510/image/resources/processed_image.jpg" String PROCESS_SUCCESS = "Processed successfully....." String PROCESS_ERROR = "Processing encounters error!" }

Image image = srcH = image.getHeight( srcW = image.getWidth( BufferedImage bufferedImage = bufferedImage.getGraphics().drawImage(image,srcW, bufferedImage = ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY),).filter(bufferedImage, FileOutputStream fos = JPEGImageEncoder encoder = } }

========================================================

More reading,and english is important.

I'm Hongten

大哥哥大姐姐,觉得有用打赏点哦!多多少少没关系,一分也是对我的支持和鼓励。谢谢。Hongten博客排名在100名以内。粉丝过千。Hongten出品,必是精品。

E | hongtenzone@foxmail.com ?B |?

========================================================

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读