All Questions
Tagged with vertical-resizing pset4
13 questions
0
votes
1
answer
24
views
PSET4 Invalid File Format when going from n = 1 to n = 2
// Copies a BMP file
#include <stdio.h>
#include <stdlib.h>
#include "bmp.h"
int main(int argc, char *argv[])
{
// ensure proper usage
if (argc != 4)
{
fprintf(stderr, "Please give ...
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 <...
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
1
answer
542
views
pset4 - resize: Scaling vertically?
I have the dimensions of the image right, and I have the horizontal scaling working, but I can't figure out how to get the vertical pixels to scale correctly. I've watched the walkthrough repeatedly, ...
1
vote
1
answer
428
views
Pset4 Resize.c Array Overstepping
I have been stuck on resize for a while. I am currently struggling on the vertical portion of resize. I am using the "rewrite" method as explained in the problem spec. My program does resize an image ...
0
votes
1
answer
93
views
Pset 4 resize: unable to get it to resize
My headers get updated accurately.
My image of small.bmp gets enlarged but the inside white box does not gets scaled vertically;Need help with debugging this.
Not able to understand the fault in my ...
0
votes
1
answer
143
views
Problems with vertical resize Pset4
I'm having problems with my vertical re-size in Pset4.
I've got the horizontal re-size working - go me!
But I'm having problems with the vertical re-size.
I'm trying to implement a version of what ...
0
votes
1
answer
303
views
pset4 resize.c fseek problem
I have a problem with vertical resizing that's been driving me crazy for weeks.
When I run ./resize 4 smiley.bmp x.bmp I get this:
When I debug the program, the variables increase as they should, but ...
0
votes
1
answer
291
views
Not able to get the correct enlarged image in resize
It is able to resize horizontally and vertically but i am not getting the correct enlarged image.
include
include
include "bmp.h"
int main(int argc, char* argv[])
{
// ensure proper usage
...
0
votes
1
answer
181
views
pset4 resize cannot figure out what's wrong
Ok I've been working on this for hours and I'm baffled. The header file all matches the staff implementation having checked it through peek.
But when I run resize 4 on small.bmp I get this:
So that ...
0
votes
1
answer
129
views
PSET 4 Resize: Printing extra scanlines
So I can manage to print the scanlines just fine widened w/padding... just cant for the life of me figure out how to repeat that line again. If the position indicator stops after the padding is ...
0
votes
1
answer
206
views
Pset4 - resize : stuck in resizing vertically (Yes, i have read other q&a regarding this topic, but still can't figure out the solution)
I don't understand why my code doesn't work the way i expected it, i believe my mistake is in understanding fseek. please help me with some advice
int scanline = 0;
int horiz = 0;
for(int i = 0, ...
0
votes
1
answer
82
views
Resize only works when n % 4 = 0, when n = 1 or when i resize a 2x2-pixel BMP and n =2
I don't know exactly where is the problem.
Resize gives me a bunch of different colors when n % 4 !=0.
Can you guys help me understand what I'm doing wrong?
// iterate over infile's scanlines
{
//...