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

9
LINES

< > BotCompany Repo | #1034804 // imagesIdentical_slow

JavaX fragment (include)

static bool imagesIdentical_slow(BufferedImage img1, BufferedImage img2) {
  if (img1 == null) ret img2 == null;
  if (img2 == null) false;
  int w = img1.getWidth(), h = img1.getHeight();
  if (w != img2.getWidth() || h != img2.getHeight()) false;
  for y to h: for x to w:
    if (img1.getRGB(x, y) != img2.getRGB(x, y)) false;
  true;
}

Author comment

Began life as a copy of #1007053

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034804
Snippet name: imagesIdentical_slow
Eternal ID of this version: #1034804/1
Text MD5: db9597e9948031bcb58c7fe9ae5c87b8
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-10 19:40:26
Source code size: 347 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 44 / 59
Referenced in: [show references]