Questions tagged [pixels]
The pixels tag has no usage guidance.
11 questions
0
votes
1
answer
182
views
Lab 4 Smiley - I can't change the color of pixels
#include "helpers.h"
void colorize(int height, int width, RGBTRIPLE image[height][width])
{
// Change all black pixels to a color of your choosing
for (int i = 0; i < height; i++)...
0
votes
1
answer
80
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
1
answer
126
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
0
answers
109
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
1
answer
24
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
1
answer
251
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
1
answer
128
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 ...
1
vote
1
answer
207
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 ...
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 ...
1
vote
2
answers
279
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 ...
0
votes
1
answer
62
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 ...