Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
40 views

Code divides image

I run my code and it complies and provides a (kind of) reflected image. It breaks the image in half and mirrors it instead of just reflecting. My goal was to switch the place of each pixel in the row, ...
michael's user avatar
  • 11
0 votes
2 answers
35 views

What does the loop for padding do in Resize(less)?

// skip over padding, if any fseek(inptr, padding, SEEK_CUR); // then add it back (to demonstrate how) for (int k = 0; k < old_padding; k++) { ...
Ryan Hinchliffe's user avatar
0 votes
1 answer
147 views

Pset 4 resize - problems with resizing

Can anyone help point out what's wrong with my resize algorithm? I have researched and tried out many ways to do it and watched the walkthrough so many times. Here's the resizing part of my code and ...
phillescatus's user avatar
0 votes
1 answer
66 views

[Pset 4 resize (less comfortable)]: problem with getting the correct RBG output

I have been stuck at Pset 4 resize (less comfortable) for some time. The program is expected to resize a bmp by a factor n. I get the correct image size but the pixel contents are not correct. Here ...
Gladys Lau's user avatar
0 votes
1 answer
162 views

pset4: resize (less comfortable)

I am receiving the below when I check Pset4: :) resize.c and bmp.h exist. :) resize.c compiles. :) doesn't resize small.bmp when n is 1 :( resizes small.bmp correctly when n is 2 Byte 22 of pixel ...
Leah Guecia's user avatar
0 votes
1 answer
74 views

pset4 resize(less) vertical

My code seems only work for horizontal but not vertical. I have tried different for loops but nothing works. Any suggestions would be extremely helpful. Thank you. // Copies a BMP file #include <...
Issa's user avatar
  • 27
1 vote
1 answer
64 views

Could someone please tell me where I'm going wrong here in resize-less(pset4)?

#include <stdio.h> #include <stdlib.h> #include <string.h> #include "bmp.h" int main(int argc, char *argv[]) { // ensure proper usage if (argc != 4) { fprintf(stderr, "Usage: ...
user21692's user avatar
0 votes
1 answer
51 views

Pset 4 - resize. Problem with proper padding

I've been stuck on resize for a while and I think I nearly have it. My outputs are nearly accurate except for the fact that some of the pixels are not being placed properly, and I think this has ...
user avatar
0 votes
1 answer
103 views

pset 4 resize (less)

Having some growing pains with this pset. I think I have the horizontal resizing figured out with my for loop. My problem is iterating over the same line x number of times (where x is the scale ...
iHusk's user avatar
  • 3
0 votes
1 answer
78 views

resize/less - testing with cs50/pset4/peek lits all green but check50 shows some error

I have tried many times to find the error but have failed to do so ... here is my resize/less code #include <stdio.h> #include <stdlib.h> #include "bmp.h" int main(int argc, char *argv[...
shaistha's user avatar
  • 117
0 votes
1 answer
111 views

Invalid or Unsupported Image Format

When I run my code and try to open the image that it created, I receive the following error: "Invalid or unsupported image format." Can someone please help me understand why this is happening? I ...
dmz's user avatar
  • 25