All Questions
15 questions
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 ...
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....
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
...
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 (...
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!
// ...
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 ...
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 ...
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 - (...
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 ...
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 ...
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 ...
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 ...
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++)
{
//...
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 ...
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 ...