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

8
LINES

< > BotCompany Repo | #1003098 // himg - HTML <img> tag - takes image url, image snippet ID or BufferedImage

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (6445L/38K).

sS himg(S src, O... params) {
  ret tag("img", "", arrayPlus(params, "src",
    isSnippetID(src) ? snippetImageLink(src) : src));
}

sS himg(BufferedImage img, O... params) {
  ret himg(dataURL(jpegMimeType(), toJPEG(img)), params);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003098
Snippet name: himg - HTML <img> tag - takes image url, image snippet ID or BufferedImage
Eternal ID of this version: #1003098/9
Text MD5: 1f3c517ea90582f6a8d2dd057e1f3fac
Transpilation MD5: a8923f248038833c146078ddd3939f8d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-03 15:49:27
Source code size: 241 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 770 / 878
Version history: 8 change(s)
Referenced in: [show references]