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

13
LINES

< > BotCompany Repo | #1035935 // qoify - convert image file to QOI

JavaX fragment (include)

1  
static File qoify(File imageFile) {
2  
  if (isQOIFile(imageFile)) ret imageFile;
3  
  loading "QOIfy" {
4  
    BufferedImage img = loadImage2(imageFile);
5  
    File destFile = replaceExtension(imageFile, ".qoi");
6  
    File atticFile = newFile(javaxDataDir("QOIfied original pictures"), imageFile.getName());
7  
    atticFile = makeFileNameUnique(atticFile);
8  
    saveQOIVerbose(destFile, img);
9  
    moveFileVerbose(imageFile, atticFile);
10  
    print("Conversion done.");
11  
    ret destFile;
12  
  }
13  
}

Author comment

Began life as a copy of #1015317

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035935
Snippet name: qoify - convert image file to QOI
Eternal ID of this version: #1035935/1
Text MD5: 8ba161af8df2402a7aac716afea3b6f7
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-15 17:18:45
Source code size: 488 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 118 / 129
Referenced in: [show references]