Skip to content
Snippets Groups Projects
Unverified Commit 8c4fb552 authored by YU LIU's avatar YU LIU Committed by GitHub
Browse files

Update PointOp.h

parent f30f06f2
No related branches found
No related tags found
No related merge requests found
...@@ -91,8 +91,8 @@ class PointOp : public GenericOperation { ...@@ -91,8 +91,8 @@ class PointOp : public GenericOperation {
Pixel Arithmetic Operations Pixel Arithmetic Operations
----------------------------------------------------------------------*/ ----------------------------------------------------------------------*/
/*Subtraction and division are based on addition and multiplication, by processing the operand.*/ /*Subtraction and division are based on addition and multiplication, by processing the operand.*/
struct PixAdd : PixOp_t<depth_t> { struct PixAdd : PixOp_t<int> {
PixAdd(double value_) : PixOp_t<depth_t>(value_) {} PixAdd(int value_) : PixOp_t<int>(value_) {}
intmax_t op(depth_t pixel) { return pixel + value; } intmax_t op(depth_t pixel) { return pixel + value; }
}; };
...@@ -102,7 +102,7 @@ class PointOp : public GenericOperation { ...@@ -102,7 +102,7 @@ class PointOp : public GenericOperation {
}; };
struct PixMul : PixOp_t<depth_t> { struct PixMul : PixOp_t<depth_t> {
PixMul(double value_) : PixOp_t<depth_t>(value_) {} PixMul(double value_) : PixOp_t<double>(value_) {}
intmax_t op(depth_t pixel) { return pixel * value + 0.5; } intmax_t op(depth_t pixel) { return pixel * value + 0.5; }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment