Questions tagged [rgbtriple]
The rgbtriple tag has no usage guidance.
6
questions
0
votes
0
answers
17
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
68
views
pset4 - (Filter Less ) - Doubts with malloc()
I'm performing the problem set from pset4 to the (filter less) part. I wish to use malloc() to my advantage to speed up image filtering and maybe check50 will accept my solution to the problem.
I ...
0
votes
1
answer
199
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
1
answer
3k
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
1
answer
117
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
2
answers
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? ...