diff --git a/LICENSE b/LICENSE index 0f9f9d7..59d58ab 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2021, 2023 D. Bohdan and contributors listed in AUTHORS +Copyright (c) 2021, 2023-2024 D. Bohdan and contributors listed in AUTHORS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/hicolor.h b/hicolor.h index f4c351e..c9e4c8b 100644 --- a/hicolor.h +++ b/hicolor.h @@ -1,6 +1,6 @@ /* HiColor image file format encoder/decoder library. * - * Copyright (c) 2021, 2023 D. Bohdan and contributors listed in AUTHORS. + * Copyright (c) 2021, 2023-2024 D. Bohdan and contributors listed in AUTHORS. * License: MIT. * * This header file contains both the interface and the implementation for @@ -19,7 +19,7 @@ #include #define HICOLOR_BAYER_SIZE 8 -#define HICOLOR_LIBRARY_VERSION 500 +#define HICOLOR_LIBRARY_VERSION 501 /* Types. */ @@ -378,7 +378,7 @@ uint8_t hicolor_bayerize_channel( double step ) { - double dithered = ((double) intensity) / 255 + step / 256 * (factor - 63/64); + double dithered = ((double) intensity) / 255 + step / 256 * factor; double levels = 128.0 / step; return (uint8_t) (round(dithered * levels) / levels * 255);