Libraryless. Click here for Pure Java version (3898L/22K).
1 | static void saveJPG(BufferedImage img, File file) ctex { |
2 | if (!ImageIO.write(img, "jpeg", mkdirsFor(file))) { |
3 | print("Reconstructing image for saving JPEG"); |
4 | img = reconstructBufferedImage(img); |
5 | if (!ImageIO.write(img, "jpeg", file)) |
6 | fail("Couldn't write JPEG: " + file + " (" + img + ")"); |
7 | } |
8 | vmBus_send('wroteFile, file); |
9 | } |
10 | |
11 | static void saveJPG(File file, BufferedImage img) ctex { |
12 | saveJPG(img, file); |
13 | } |
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: | 723 / 743 |
Version history: | 5 change(s) |
Referenced in: | [show references] |