Libraryless. Click here for Pure Java version (3898L/22K).
static void saveJPG(BufferedImage img, File file) ctex { if (!ImageIO.write(img, "jpeg", mkdirsFor(file))) { print("Reconstructing image for saving JPEG"); img = reconstructBufferedImage(img); if (!ImageIO.write(img, "jpeg", file)) fail("Couldn't write JPEG: " + file + " (" + img + ")"); } vmBus_send('wroteFile, file); } static void saveJPG(File file, BufferedImage img) ctex { saveJPG(img, file); }
Began life as a copy of #1003962
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, ofpaelxlmzfo, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004891 |
| Snippet name: | saveJPG |
| Eternal ID of this version: | #1004891/6 |
| Text MD5: | 5f89d9caf55f241912ac5dd41e0f52a3 |
| Transpilation MD5: | 8f9cd8d39e0a9dc1529e33f5821df343 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-11 05:13:34 |
| Source code size: | 436 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 957 / 1023 |
| Version history: | 5 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1006835 - saveJPEG - synonym of saveJPG + swapped parameters #1015323 - saveJPGVerbose #1035936 - saveQOI |