Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ロードされた画像からJavaでバイトの配列を取得する方法を知る必要があります。BufferedImageはバイトの配列を生成するメソッドを提供していないようですが、何を使用しますか?
BufferedImage bufferedImage; //assumed that you have created it already ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); ImageIO.write(bufferedImage,"jpg", byteStream); byte[] byteArray = byteStream.toByteArray();