How to grab byte[] of an Image in java?

后端 未结 3 1469
面向向阳花
面向向阳花 2021-01-23 22:40

I have a url of an Image. Now I want to get the byte[] of that image. How can I get that image in byte form.

Actually the image is a captcha image. I am using decaptcher

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-23 23:31

    You may want to read this for reading an image in. ImageIO.Read(url) will give you a Buffered Image Which you can then ask for information. I use the getRGB method on BufferedReader to read individual pixels.

提交回复
热议问题