Questions tagged [rgbtriple]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

How do I fix my code for PSET 4 blur?

What I tried to do was go to each pixel and see if any neighboring ones existed. If they did, I saved the neighboring pixel's colors. Then I ran a loop to add up all the values in that specific color ...
0
votes
1answer
117 views

How does RGBTRIPLE differentiate between the 3 bytes it reads from input file and assign them to rgbt blue, green and red?

sorry if the question is confusing, but i completed the whodunit problem in pset3 and my doubt was that in the following code: // iterate over pixels in scanline for (int j = 0; j < bi....
2
votes
1answer
2k views

How does “RGBTRIPLE triple;” know whitch pixel to store?

I'm currently working on the cs50 pset4. My question is pretty straight forward: How does the line (marked with caps lock comment) "RGBTRIPLE triple;" knows whicht pixel currently to store? I get the ...
0
votes
1answer
115 views

pset 4, resize.c is not working

Here is the code for resize.c I am stuck for quite some time now and i am not able to figure out where i am wrong. please help. bi.biHeight = height*n; bi.biWidth = width*n; // determine new padding ...
2
votes
2answers
4k views

Why is RGBTRIPLE in our bitmap 3 bytes? Is that defined somewhere?

This question was asked in the comments of another question, and I think it's a good question, but I wanted to make sure this was addressed in the proper place: How do I know RGB triple is 3 bytes? ...