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

10
LINES

< > BotCompany Repo | #1007117 // cUpdatePNGFile

JavaX fragment (include)

static void cUpdatePNGFile(Concept c, S field, BufferedImage image, bool deleteOldFile) {
  PNGFile png = cast cget(c, field);
  if (image == null && png  != null)
    cset(c, field, null);
  else if (image != null &&
    (png == null || !imagesIdentical(png.getImage(), image))) {
    if (png != null && deleteOldFile) png.delete();
    cset(c, field, new PNGFile(image));
  }
}

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: 603 / 656
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)