mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-03 10:30:24 +01:00
[test] bufferdiff: take abs of the pixel diffs. Oops!
This commit is contained in:
parent
988b5dcb7e
commit
96c8f92883
1 changed files with 2 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
@ -93,7 +94,7 @@ buffer_diff_core (unsigned char *_buf_a,
|
|||
unsigned char value_a = (row_a[x] >> (channel*8));
|
||||
unsigned char value_b = (row_b[x] >> (channel*8));
|
||||
unsigned int diff;
|
||||
diff = value_a - value_b;
|
||||
diff = abs (value_a - value_b);
|
||||
diff *= 4; /* emphasize */
|
||||
if (diff > 255)
|
||||
diff = 255;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue