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

11
LINES

< > BotCompany Repo | #1036581 // servePNG

JavaX fragment (include)

1  
static NanoHTTPD.Response servePNG(BufferedImage img) {
2  
  ret serveByteArray(toPNG(img), pngMimeType());
3  
}
4  
5  
static NanoHTTPD.Response servePNG(File file) {
6  
  ret serveFile(file, pngMimeType());
7  
}
8  
9  
static NanoHTTPD.Response servePNG(byte[] imgData) {
10  
  ret serveByteArray(imgData, pngMimeType());
11  
}

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: 139 / 168
Version history: 2 change(s)
Referenced in: [show references]