-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
In routine parse_im (file "video_capture.c") you protect against the calculated values of RGB being greater than 255, and clip them to this maximum value. However you do not protect against them going negative (which can happen in dark areas of the image).
The code needs to be extended as:
if(B > UCHAR_MAX){
B = UCHAR_MAX;
} else if(B < 0){
B = 0;
}
if(G > UCHAR_MAX){
G = UCHAR_MAX;
} else if(G < 0){
G = 0;
}
if(R > UCHAR_MAX){
R = UCHAR_MAX;
} else if(R < 0){
R = 0;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels