pull/1238/head^2
gedoor 3 years ago
parent 53a59762c3
commit 62dc50e56f
  1. 1
      app/src/main/java/io/legado/app/web/HttpServer.kt

@ -71,6 +71,7 @@ class HttpServer(port: Int) : NanoHTTPD(port) {
val outputStream = ByteArrayOutputStream() val outputStream = ByteArrayOutputStream()
(returnData.data as Bitmap).compress(Bitmap.CompressFormat.PNG, 100, outputStream) (returnData.data as Bitmap).compress(Bitmap.CompressFormat.PNG, 100, outputStream)
val byteArray = outputStream.toByteArray() val byteArray = outputStream.toByteArray()
outputStream.close()
val inputStream = ByteArrayInputStream(byteArray) val inputStream = ByteArrayInputStream(byteArray)
newFixedLengthResponse( newFixedLengthResponse(
Response.Status.OK, Response.Status.OK,

Loading…
Cancel
Save