static File putImageInDirectory_jpeg(BufferedImage img, File dir) { if (img == null) null; byte[] data = toJPEG(img); S md5 = md5(data); File f = newFile(dir, md5 + ".jpg"); if (!f.exists()) saveBinaryFile(f, data); ret f; }
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019183 |
Snippet name: | putImageInDirectory_jpeg - uses MD5 of JPEG file as file name |
Eternal ID of this version: | #1019183/3 |
Text MD5: | 1e7502ae29a01e011f09be1e29b2a95b |
Author: | stefan |
Category: | javax / image io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-06 19:02:40 |
Source code size: | 248 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 351 / 372 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |