/** * Put image RGB data into the {@link ByteBuffer}. Please note that data from {@link ByteBuffer} * consumed by this method does not contain original JPEG data bytes, but bytes representing RGB * data of the image constructed from JPEG data. */ @Override public void getImageBytes(ByteBuffer buffer) { final BufferedImage bi = getImage(); if (bi != null) { buffer.put(ImageUtils.imageToBytes(bi)); } } }
/** * Return image RGB data in form of {@link ByteBuffer}. Please note that {@link ByteBuffer} * returned by this method does not contain original JPEG data bytes, but bytes representing RGB * data of the image constructed from JPEG data. */ @Override public synchronized ByteBuffer getImageBytes() { final BufferedImage bi = getImage(); if (bi == null) { return null; } return ByteBuffer.wrap(ImageUtils.imageToBytes(bi)); }
/** * Return image RGB data in form of {@link ByteBuffer}. Please note that {@link ByteBuffer} * returned by this method does not contain original JPEG data bytes, but bytes representing RGB * data of the image constructed from JPEG data. */ @Override public synchronized ByteBuffer getImageBytes() { final BufferedImage bi = getImage(); if (bi == null) { return null; } return ByteBuffer.wrap(ImageUtils.imageToBytes(bi)); }
/** * Put image RGB data into the {@link ByteBuffer}. Please note that data from {@link ByteBuffer} * consumed by this method does not contain original JPEG data bytes, but bytes representing RGB * data of the image constructed from JPEG data. */ @Override public void getImageBytes(ByteBuffer buffer) { final BufferedImage bi = getImage(); if (bi != null) { buffer.put(ImageUtils.imageToBytes(bi)); } } }