-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
491 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
#include "framework.h" | ||
|
||
typedef void (*BitmapHandler)(int& r, int& g, int& b, int& a); | ||
bool RecolorizeBitmap(HBITMAP hbm, BitmapHandler handler); | ||
typedef void (*BitmapPixelHandler)(int& r, int& g, int& b, int& a); | ||
|
||
bool IterateBitmap(HBITMAP hbm, BitmapPixelHandler handler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
#pragma once | ||
#include "framework.h" | ||
|
||
typedef struct { | ||
double r; // a fraction between 0 and 1 | ||
double g; // a fraction between 0 and 1 | ||
double b; // a fraction between 0 and 1 | ||
} rgb; | ||
DWORD rgb2bgr(COLORREF rgb); | ||
|
||
typedef struct { | ||
double h; // angle in degrees | ||
double s; // a fraction between 0 and 1 | ||
double v; // a fraction between 0 and 1 | ||
} hsv; | ||
struct rgb_t | ||
{ | ||
double r, g, b; | ||
}; | ||
|
||
hsv rgb2hsv(rgb in); | ||
rgb hsv2rgb(hsv in); | ||
struct hsv_t | ||
{ | ||
double h, s, v; | ||
}; | ||
|
||
int GetHSVh(COLORREF dwColor); | ||
|
||
#define RGB2BGR(color) (color & 0xFF000000) | ((color & 0xFF0000) >> 16) | (color & 0x00FF00) | ((color & 0x0000FF) << 16) | ||
hsv_t rgb2hsv(rgb_t in); | ||
rgb_t hsv2rgb(hsv_t in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.