Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1036581 // servePNG

JavaX fragment (include)

static NanoHTTPD.Response servePNG(BufferedImage img) {
  ret serveByteArray(toPNG(img), pngMimeType());
}

static NanoHTTPD.Response servePNG(File file) {
  ret serveFile(file, pngMimeType());
}

static NanoHTTPD.Response servePNG(byte[] imgData) {
  ret serveByteArray(imgData, pngMimeType());
}

Author comment

Began life as a copy of #1011249

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036581
Snippet name: servePNG
Eternal ID of this version: #1036581/3
Text MD5: dae95b1bfce330146c4421fec5481a25
Author: stefan
Category: javax / html
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-03-20 22:05:09
Source code size: 307 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 137 / 165
Version history: 2 change(s)
Referenced in: [show references]