Ananiya
08/17/2022, 12:37 PMBufferedImage over websocket efficiently
1 tried to deserilize the constructor using GSON because it has nested object resulting the https://stackoverflow.com/questions/43301580/gson-cant-serialize-bufferedimages
2 tried kotlinx serilization , doesn't work since BufferedImage has no @Serilizable annotation
3 tried converting buffered image -> float array -> to string(using joinToString) kind of worked but its super slow and unresponsive
4 tried converting buffered image -> bytearray using ByteArrayOutputStream and ImageIO.write() has made significant improvement but still unusable
I don't think the IO method would be any efficient but if there's any way to send the whole BufferedImage object or deserilizing it without using IO would be take less timeAleksei Tirman [JB]
08/18/2022, 6:51 AMAnaniya
08/19/2022, 12:51 PMAleksei Tirman [JB]
08/19/2022, 1:55 PMBufferedImage) from the webcam to send it over a Websocket connection?Ananiya
08/19/2022, 1:58 PMByteBuffer but was empty