Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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
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 ...
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 ...
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 ...
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 ...