mirai-core / net.mamoe.mirai.utils / java.io.InputStream

Extensions for java.io.InputStream

suspendToExternalImage

IO 中进行 InputStream.toExternalImage

suspend fun InputStream.suspendToExternalImage(): ExternalImage

toExternalImage

保存为临时文件然后调用 File.toExternalImage

fun InputStream.toExternalImage(): ExternalImage