Playを使用して生成された画像を出力しようとしています。私の問題がPlay固有のものであるかどうかはわかりません。私はこのPHPコードと同じことをしようとしています:
header("Content-type: Image/png");
$map = imagecreatefrompng("$_SESSION[ROOT]/it/cabling/maps/${building}_$floor.png");
... // add annotations
imagepng($map);
を使用する必要があるようですが、引数として必要なaからにrenderBinary
到達する方法がわかりません。BufferedImage
InputStream
renderBinary
Application.map
アクション:
public static void map(String building_code, String ts_code) throws IOException {
BufferedImage image = ImageIO.read(new File("public/images/maps/" + building_code + "_" + ts_code.charAt(0)));
... // Overlay some additional information on the image
// do some sort of conversion
renderBinary(inputStream);
}