Questions tagged [pixels]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
1
vote
2answers
115 views

Pset4 8x8 smiley only showing 7x7

I thought that my resize.c was not resizing correctly. I enlarged the original small.bmp 3x3 by factor of 2 into large.bmp, but the resized image would only show (on screen) 5x5 instead of 6x6, which ...
1
vote
1answer
146 views

Questions: Is my small.bmp corrupted?/ How do I read the rgb values of each pixel from the ready outfile?

So this should be a little complex of questions. 1. I want to ask if my small.bmp file looks normal: I looked at it with the command "xxd -c 12 -g 3 -s 54 small.bmp" and the output was the same as ...
0
votes
1answer
71 views

pset4 resize size is correct, but the pixel colors are all wrong

I'm trying to resize the image using the "recopy" method Zamyla stated in the video, but I can't figure out why the colors are all messed up. I've tried looking at other questions, but it hasn't ...
0
votes
1answer
18 views

PSET4 Invalid File Format when going from n = 1 to n = 2

// Copies a BMP file #include <stdio.h> #include <stdlib.h> #include "bmp.h" int main(int argc, char *argv[]) { // ensure proper usage if (argc != 4) { fprintf(stderr, "Please give ...
0
votes
1answer
242 views

Pset 4— Resize

I've gone through my code, and I've progressed now to the point that the outfile finally scaled correctly, but now the colors are off for some reason, and I have no idea why (Infile and Outfile BMPs ...
0
votes
1answer
119 views

Pset 4: Stuck in a loop again (all green pixels)

So, I've figured out how to change the file headers and all. Works beautifully. The large image is the right size. I couldn't be happier. However, the large bmp image is just filled with neon green ...
0
votes
0answers
28 views

PSET4/filter: Help me see/understand RGB values of individuals pixels in BMP files

Before working on filters in problem set 4, I wanted to make sure I understood the basics. I have downloaded yard.bmp (attached here) and am trying to do simple operations (e.g. use pointers, extract ...
0
votes
1answer
84 views

PSet 3: Help with colors for “whodunit”

I've successfully decoded the solution to "Whodunit" from CS50 2018 (won't put the spoiler here, though will say the culprit's name has six letters), but will admit it was a lucky guess involving ...
0
votes
0answers
105 views

PSET3 Resize -resizes correctly Byte… doesn't match

I don't understand what I did wrong... Here's my code : // Copies a BMP file #include <stdio.h> #include <stdlib.h> #include "bmp.h" int main(int argc, char *argv[]) { int n = ...
0
votes
1answer
59 views

Too many pixels on “Resize”, correct headers/image but does not pass check50!

I have a strange flaw in my program. Initially everything looks fine, it can resize any image correctly and the headers of the staff solutions and mine all match via "peek", so it seems that it makes ...