1 | static File jpegify(File imageFile) { |
2 | if (isJPEGFile(imageFile)) ret imageFile; |
3 | loading "JPEGify" { |
4 | BufferedImage img = loadImage2(imageFile); |
5 | File destFile = replaceExtension(imageFile, ".jpg"); |
6 | File atticFile = newFile(javaxDataDir("JPEGified original pictures"), imageFile.getName()); |
7 | atticFile = makeFileNameUnique(atticFile); |
8 | saveJPGVerbose(destFile, img); |
9 | moveFileVerbose(imageFile, atticFile); |
10 | print("Conversion done."); |
11 | ret destFile; |
12 | } |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1015317 |
Snippet name: | jpegify - convert image file to JPEG |
Eternal ID of this version: | #1015317/8 |
Text MD5: | 4505ab9140bb344d83400d158f62a878 |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-31 17:26:58 |
Source code size: | 495 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 613 / 567 |
Version history: | 7 change(s) |
Referenced in: | [show references] |