Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
132 views

Pset3 - Resize (less confortable)

I am getting an error at IDE "Invalid or unsupported file format" for an input "n" equal or greater than: 68 for small.bmp 36 for smiley.bmp 27 for large.bmp I also tried to peek with staff's ...
Bruno Fialho's user avatar
1 vote
2 answers
47 views

Resize less fails when trying to resize small.bmp when n is not multiple of 4 or is 1(probably padding issue)

int oldHeight = bi.biHeight; int oldWidth = bi.biWidth; bi.biWidth *= n; bi.biHeight *= n; int padding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4; bi.biSizeImage = ((sizeof(RGBTRIPLE) * bi....
Afonso's user avatar
  • 11
0 votes
1 answer
37 views

CS50 Resize(less comfortable) I can't create OUTFILE

I've been working on this pset for quite a few days now, but my program doesn't seem to be compiling. It keeps saying "could not create outfile"(my message). I have no idea what to do. Any help would ...
Kevin's user avatar
  • 1
0 votes
2 answers
72 views

Problem with CS50 Pset3 Resize Less

The issue that keeps occurring after compiling and running the file, is that the resulting output bmp file changes to an unsupported file format(as stated when clicking on the bmp image file after ...
Leah's user avatar
  • 3
0 votes
1 answer
60 views

writing pixels n times to array

i'm struggling trying to figure out how to store pixels n times to an array for (int i = 0, biHeight = abs(oldheight); i < biHeight; i++) { // iterate over pixels in scanline for (...
samia's user avatar
  • 3
0 votes
1 answer
86 views

pset3 resize less

I'm having some problems and cannot seem to find the bugs. The program seems to function correctly but cs50 check says that the file is too large. Would love to have someone to look at my code and ...
asaf's user avatar
  • 3
0 votes
1 answer
53 views

CS50 - Pset3 - Resize (Less) - Wrong Bitmap Size

Could someone please review my code for Resize (Less) pset? My code resized everything correctly before I added a couple of extra variables and changed some things up, so I had some base sizes that ...
Isaac Vernon's user avatar
0 votes
1 answer
79 views

pset3 Resize - Invalid or unsupported Image Format

So i think i finished resizing horizontally but when i try to open the output image to check i get an error saying "Invalid or unsupported Image Format", I read other similar questions here and i ...
Eric Forman's user avatar
0 votes
1 answer
96 views

Where am I going wrong with this resize?

My output is a grey square with a white rectangle at the top and bottom. What is it fwriting? // iterate over infile's scanlines (for each row) for (int i = 0; i < bi.biHeight; i++) { //...
KayO133's user avatar
  • 33
0 votes
1 answer
25 views

Resize Less - failing to resize small.bmp

Hi guys I've scratched my head about this for a week now and I'm struggling to see what the issue is. The smiley.bmp file seems to be resizing correctly but not the others. Can anyone offer some ...
GFitzP's user avatar
  • 19
0 votes
1 answer
30 views

pset3 resize less comfortable problem - mixed colour

I have been struggling with cs50 resize for quite some time. Can't figure out why my code is wrong. The output seems to have a right size but it is in a bunch of random colour. // Copies a BMP file ...
junyuanjyjy's user avatar
0 votes
1 answer
39 views

PSET 3: Color is messed up

I can't figure out how to fix the colors of large.bmp when I run it. It resizes correctly but the pixels are all messed up and don't look like the original. Someone help me? Please and thank you! // ...
Lyle Boc's user avatar
0 votes
1 answer
56 views

PSet 3: resize (less) bfsize error

I'm SO close (I think!) to being done with "Resize (Less)" after a grueling run. After running check50, I'm a bit kerfuffled. Hexadecimal form of output file seems correct, as do the values of and ...
LippStick's user avatar
0 votes
1 answer
31 views

Confusion with understanding how new values are assigned

I do not quite understand how this reuse of variables is incorrect: // save initial values int initial_Height = bi.biHeight; int initial_Width = bi.biWidth; int initial_padding = (4 - (...
Alex Ljamin's user avatar
0 votes
1 answer
72 views

pset3 resize (less) compiles but doesn't write into new file for factor != 1

I've been stuck with the pset3 for a long time now and can't figure out why my code isn't working; it compiles fine but doesn't produce an image except for the factor 1. Could someone point me in the ...
Ivo's user avatar
  • 113