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

10
LINES

< > BotCompany Repo | #1007117 // cUpdatePNGFile

JavaX fragment (include)

1  
static void cUpdatePNGFile(Concept c, S field, BufferedImage image, bool deleteOldFile) {
2  
  PNGFile png = cast cget(c, field);
3  
  if (image == null && png  != null)
4  
    cset(c, field, null);
5  
  else if (image != null &&
6  
    (png == null || !imagesIdentical(png.getImage(), image))) {
7  
    if (png != null && deleteOldFile) png.delete();
8  
    cset(c, field, new PNGFile(image));
9  
  }
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007117
Snippet name: cUpdatePNGFile
Eternal ID of this version: #1007117/1
Text MD5: 053e1be49f75d02a65090af4e349d92d
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-04 16:53:34
Source code size: 388 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 604 / 658
Referenced in: [show references]