Commit c2ed90ec authored by Davis King's avatar Davis King

Changed the pixel_traits so that signed grayscale pixel types are allowed. This

involved adding a few new fields to pixel_traits.  I also changed the get_pixel_intensity()
function so that its return value is of the same type as the basic pixel type rather
than always being unsigned long.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403967
parent b7c2625c
......@@ -129,7 +129,10 @@ namespace dlib
const static bool grayscale = false;
const static bool hsi = false;
const static long num = 3;
static unsigned long max() { return 255;}
typedef unsigned char basic_pixel_type;
static basic_pixel_type min() { return 0;}
static basic_pixel_type max() { return 255;}
const static bool is_unsigned = true;
const static bool has_alpha = false;
};
......
......@@ -145,7 +145,10 @@ namespace dlib
const static bool grayscale = false;
const static bool hsi = false;
const static long num = 3;
static unsigned long max() { return 255;}
typedef unsigned char basic_pixel_type;
static basic_pixel_type min() { return 0;}
static basic_pixel_type max() { return 255;}
const static bool is_unsigned = true;
const static bool has_alpha = false;
};
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment