Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
265 views

Having trouble with PSet4 resize problem

I'm having difficulty with PSet4's resize problem right now. I feel like I've implemented it correctly, but the result is a colour-mish-mash which ends half way through the file. My solution was to ...
Andrew's user avatar
  • 105
1 vote
1 answer
104 views

Pset 4 Resize makes a very colorful picture (not green!)--padding problem?

Well, it looks like I'm not the only one having issues with padding (I suspect that's my problem). Specifically, if I test my version of resize with an enlargement factor of 2 (using small.bmp as ...
Rhinofish's user avatar
0 votes
1 answer
62 views

Resize Adding Too Much Padding

I'm really struggling with resize on pset4. My loop is adding too much padding, I think by a factor of the scale. I'm still working on the horizontal stretch portion of the program. I'm pretty sure ...
Wes Basinger's user avatar
0 votes
1 answer
59 views

Odd IDE behavior during pset4

I just finished writing the code for the resize problem of pset4. When I run my code in the debugger, everything turns out right, but when I run it simply in the terminal, the computer complains about ...
Christophe Caron's user avatar
0 votes
1 answer
79 views

PLEASE HELP!! cs50 pset4 resize.C complies but cannot resize 1x1 correctly. ,AND large.bmp says"invalid image or format"

Here's the code I finally have. but the issue is the cs50 check says : :) resize.c and bmp.h exist :) resize.c compiles :( doesn't resize 1x1-pixel BMP when n is 1 :( resizes 1x1-pixel BMP to 2x2 ...
qingming's user avatar
0 votes
2 answers
59 views

can't pass check50

My code works correctly. large creates and correctly. but it simply won't pass check50 /** * copy.c * * Computer Science 50 * Problem Set 4 * * Copies a BMP piece by piece, just because. */ #...
Chinebuah's user avatar
0 votes
1 answer
605 views

pset4 resize: how to copy a row

Just spent 2 days for figuring out how fread(), fwrite() and fseek() works. I tried to use "Rewrite" method from Zamyla's video for vertycal resizing: - Remember pixels in array (first written row of ...
Semyon Pilyukov's user avatar
0 votes
1 answer
494 views

pset4 malloc() approach. Help with size of buffer

I'm having some trouble with the malloc function. I want to make a buffer the size of the new row I'm going to write in the resized file, and this is my approach. I must say that bi.biWidth is ...
Alejandro Aristizábal's user avatar
0 votes
1 answer
118 views

pset 4, resize.c is not working

Here is the code for resize.c I am stuck for quite some time now and i am not able to figure out where i am wrong. please help. bi.biHeight = height*n; bi.biWidth = width*n; // determine new padding ...
Kishore Vasan's user avatar
0 votes
1 answer
246 views

Pset4 Resize Error

When I try to run the program, I get the message "file size limit exceeded." After looking over my code many times, I can't figure out what might be going wrong?? /** * copy.c * * Computer Science 50 ...
Andrea Perry's user avatar
0 votes
1 answer
145 views

pset4 resize premature end of file encountered

This is extremely frustrating. I've been having header problems for a while, getting various error messages. However, using xxd I can see that when I run resize with n=2, biSizeImage is indeed 120, ...
noneofyourbusiness's user avatar
0 votes
1 answer
434 views

PS4 Resize makes random colors

So, I'm in the midst of PS4 resize, and while I know I'm still figuring out an array of different things, when i currently perform the resize (even if I "resize" it to the same size) it seems to be ...
Brian Hodges's user avatar
0 votes
1 answer
733 views

pset4 - resize.c - Cannot get vertical resizing to work

and thanks for helping me with my problem. I have managed to get horizontal resizing to work within my resizing program, but every time I attempt the next step, I keep failing. Here is the code of the ...
jackyboy633's user avatar
0 votes
1 answer
112 views

Resize not working (writes RGBTRIPLE too many times)

In resize.c, the image created in my resized image is a tiny image with a black blotch in the middle, regardless of whether I use small.bmp or smiley.bmp as input. When I run xxd, the header in the ...
Yami Medina's user avatar
0 votes
1 answer
98 views

Why is biSizeImage a random number?

I found this anomaly when running peek, then confirmed with gdb that bi.biSizeImage is getting set to 4294966864 when it should be 432.
jhschwartz's user avatar
0 votes
1 answer
517 views

resize pset 4 confused on number of things

I think I have the headers correct except for the new bf.Size not to sure on that one. I am having real problems with resizing the bitmap and I can't figure out what it is, any hints or pointers in ...
JV305's user avatar
  • 29
1 vote
2 answers
729 views

How to create a BMP image that is compatible with resize?

Using my resize on small.bmp and smiley.bmp then with cs50's peek, I get the exact same values as with the staff's solution for BITMAPFILEHEADER and BITMAPINFOHEADER (I tested with different n values)....
Touten's user avatar
  • 23