Questions tagged [greyscale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Pset4 (Filter-Less) Greyscale not passing check50

I tried implementing the GreyScale function but I didn't got the average values of the pixels correctly. I don't know what I'm doing wrong. Any hints will be appreciated. My code: void grayscale(int ...
0 votes
0 answers
25 views

Why do we not need to read RGBTRIPLE in PSET4 Filter (Less Comfortable)?

For BITMAPFILEHEADER and BITMAPINFOHEADER, the code uses the function "fread()" as seen below. fread(&bf, sizeof(BITMAPFILEHEADER), 1, inptr); However, for RGBTRIPLE, the solution for ...
0 votes
1 answer
74 views

cs50 Pset 4 filter:Greyscale. Cade is not averaging correctly?

So I am a little stuck on the Greyscale protion of the Pset4. I have the code in place as follows... void grayscale(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < ...
  • 7
0 votes
1 answer
47 views

Pset4: filter greyscale UndefinedBehaviorSanitizer (not due to incorrect order of height and width)

I've seen all the other questions and answers regarding this specific error. Thankfully, or not so, my error was not due to the order in which I looped through the image. Here's my code: void ...
0 votes
1 answer
23 views

getting undefined behaviour sanitiser deadly signal error which crashes everything when trying t run greyscale filter on pset4!

The below image shows my code and all the errors that come when I run it. I have to exit the terminal and start again to do anything! I don't understand what is wrong with the code. I have looked ...
2 votes
3 answers
164 views

pset4 filter grey scale error

when I try to test the code I get an infinite loop of errors: UndefinedBehaviorSanitizer:DEADLYSIGNAL what am i missing ??? void grayscale(int height, int width, RGBTRIPLE image[height][width]) { for (...
  • 109