Libraryless. Click here for Pure Java version (3336L/18K).
1 | static Pt firstDifferingPixel(BufferedImage etc img1, BufferedImage etc img2) { |
2 | assertSameSize(img1, img2); |
3 | int w = img1.getWidth(), h = img1.getHeight(); |
4 | for y to h: |
5 | for x to w: |
6 | if (getPixel(img1, x, y) != getPixel(img2, x, y)) |
7 | ret pt(x, y); |
8 | null; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032255 |
Snippet name: | firstDifferingPixel - in scan-line order |
Eternal ID of this version: | #1032255/2 |
Text MD5: | 35fbc4dcebb3e4937b74b43c12aa3417 |
Transpilation MD5: | f1d6ccd119c2a5043bceb736c527e2a2 |
Author: | stefan |
Category: | javax / images |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-23 01:51:32 |
Source code size: | 284 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 152 / 228 |
Version history: | 1 change(s) |
Referenced in: | [show references] |