Questions tagged [pset4resize]
The pset4resize tag has no usage guidance.
25
questions
0
votes
1
answer
64
views
Why is my cs50 resize not working?
I have been working on cs50 resize less for 3 weeks on and off and can't seem to get the image to be resized properly.
The real problem is I don't know where my program is failing.
Can anyone point ...
1
vote
1
answer
128
views
What's wrong with my Resize (Less) code? Pset3
I've been stuck with Resize (Less) using the "Rewrite" method for days but just can't seem to figure out what's wrong with my code. My code compiled OK, and has no problem with n=1. But it can't ...
0
votes
1
answer
39
views
pset4 resize: setting bfSize and biSizeImage hexadecimal values
I'm having difficulty setting the bfSize and biSizeImage header values. I should have the correct formulas for both values, however when I write either value to the output file I lose the leftmost ...
0
votes
0
answers
24
views
pset4 resize when the factor less than 1
everybody. I am trying a resize problem, it seems when the factor more than 1 works(here my factor is num), but I could not figure out why when the num < 1 doesn't work. It really confused me.
My ...
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 ...
0
votes
1
answer
75
views
pset4 resize less - starting to despair!
I'm utterly stuck on this pset. I don't want to give up on the course, but I've spent weeks and weeks looking on forums for help and I still have no idea where my code is going wrong. I'd really ...
0
votes
1
answer
77
views
PSET4 - Resize, less comfortable - Check50: Image has more bytes than expected
I am currently struggling to understand why my images has more bytes than the staff example given. Comparing the actual sizes of the two .bmp files I find that:
student.bmp - 1062 bytes.
staff.bmp - ...
0
votes
1
answer
57
views
pset4 won't resize vertically
I've managed to get my code to work for resizing the image horizontally, but I'm not sure why it doesn't seem to resize the image vertically
// Copies a BMP file
#include <stdio.h>
...
0
votes
1
answer
44
views
My latest two problems aren't being scored
I submitted one of my problem sets and I'm unable to get my problem scored.
screenshots:
0
votes
1
answer
43
views
resize(less) am baffled dont know whats changed pls help
okay so yesterday I started resize and made a bit of progress, today I played around with it to try and fix the alignment issues I had and somehow totally screwed it up and now I'm getting colours ...
0
votes
1
answer
131
views
pset4 header file problem
i'm facing problem with header file, every time i check50 my solution i get this error message:
Header field bfType doesn't match. Expected 0x4d42, not 0x28
despite i used printf after copying data ...
0
votes
1
answer
20
views
whats wrong with my code ?why am I not getting the same image?
#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,...
0
votes
1
answer
324
views
resize runtime error pset4
My code compiles, but when I execute this I get:
runtime error: index 4 out of bounds for type 'RGBTRIPLE [newbi.biWidth]'
Where does 4 come from? Is it the number of arguments??
Thanks for any help....
0
votes
1
answer
1k
views
PSET4: free(): invalid next size (fast)
So as the title says, I'm trying to do the pset4 where I get this error when I try to execute the program. I've searched the forum and also Reddit, and I understood that I've some issue with the ...
0
votes
1
answer
522
views
pset4 resize working perfectly but can't pass check50
I am in the 4th problem set in cs50 trying to do resize.c.
I worked on it for about 3 days and finally everything is going great the program can resize whatever bitmap photo I throw at it.
I was ...
0
votes
1
answer
50
views
pset 4 resize (more confortable) pixel loss logic
I managed to write the correct output file headers, but when I went to actually implementing the resize logic, things got a bit complicated.
I can pretty much understand factors of resize bigger than ...
2
votes
1
answer
549
views
Pset4 resize/less - rewrite (Hint needed)
I was trying to implement the rewrite method. the code compiles without error but I always get a weird result bitmap.
Here is the code I wrote:
#include <stdio.h>
#include <stdlib.h>
#...
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 ...
0
votes
1
answer
155
views
PSET 4 (Resize)-- Vertical Scaling
I'm having trouble with the vertical scaling. I've reviewed my code and it seems like it should scale correctly, but instead I get the following picture.
My pseudocode for vertically scaling goes as ...
0
votes
0
answers
24
views
pset4 resize compilation problem infile/outfile
Good evening! Every time I try try to compile a program in the virtual machine I get some troubles. This time when I compile ./resize 4 small.bmp large.bmp it shows me "infile/outfile". What do I do ...
0
votes
1
answer
65
views
hey guys i am stuck with resize. when i am trying to resize the bitmap image to smaller size it give me random image
/**
* Copies a BMP piece by piece, just because.
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "bmp.h"
int main(int argc, char *argv[])
{
int n;
//...
0
votes
1
answer
22
views
Image Dimensions Will Not Resize Correctly -- Recopy Method
I've been struggling with Resize on Pset4 for awhile now and can't quite seem to figure out what I am doing wrong. I am trying to implement the Recopy method with the following psuedocode:
for each ...
0
votes
1
answer
21
views
Pset4 Resize: Problem resizing verticaly
Im having problems getting the vertical resize to work properly. It resizes smiley.bmp ok but small.bmp not som much. im getting blue and red lines. i have tried to find the sollution in other peoples ...
1
vote
1
answer
674
views
Arrays of Pointers - implicit double dereferencing
Good day people!
The context is resize program in problem set 4, however, the question is general.
Following is how the main function begins for the relevant program:
int main(int argc, char *argv[])...
0
votes
1
answer
69
views
Pset 4 resize: Image remains same size and image changes
I have an issue that I have been tearing my hair out for a week about. My code does not resize the image and it doesn't keep the image the same. What is the problem with my logic?
/**
* Copies a BMP ...