1 | static bool imagesIdentical_slow(BufferedImage img1, BufferedImage img2) { |
2 | if (img1 == null) ret img2 == null; |
3 | if (img2 == null) false; |
4 | int w = img1.getWidth(), h = img1.getHeight(); |
5 | if (w != img2.getWidth() || h != img2.getHeight()) false; |
6 | for y to h: for x to w: |
7 | if (img1.getRGB(x, y) != img2.getRGB(x, y)) false; |
8 | true; |
9 | } |
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: | 160 / 161 |
Referenced in: | [show references] |