Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
0
votes
Accepted
Resize Less - failing to resize small.bmp
After each line from the input file is read, the code moves forward over the padding.
When you move backwards in the input file to repeat a line, are you considering the size of the input line's padd …
0
votes
Accepted
PSet 3: resize (less) bfsize error
Without actaully testing your code, I see a serious issue. While you've calculated new values for the various header fields (I'll assume that you calculated them right), the results were stored in lo …
0
votes
resize less help needed
So close indeed!!!
I'll give you a hint. When you're working with an open file, are you sure that you're using values appropriate for the right file? In other words, input file vars when working wi …
0
votes
What does the loop for padding do in Resize(less)?
This is code from the original copy.c program that will later be used in resize.
An fseek call will cause the file pointer to change position in a file. You should google it and study the details.
I …
1
vote
Accepted
Problem with CS50 Pset3 Resize Less
Hmmm.....
After the code creates the output file headers, do you think it would be useful to load/copy the values from the input file headers into the output file headers?
// write outfile's BITMAP …
1
vote
Accepted
pset3 resize less
Have you looked at the actual hex data of the file instead of the image? When looking at the image, the header data (assuming it's correct) will only allow the display of the specified amount of data …
1
vote
Accepted
CS50 - Pset3 - Resize (Less) - Wrong Bitmap Size
The code will work when the scaling factor is 1, but not otherwise.
The problem is straightforward. The code calculates the new biHeight and biWidth values, but it doesn't plug them back into the …
1
vote
Accepted
CS50 pset3 i want to resize this image, code is working for some and not for others? Can any...
The problems revolve around how the pointer is moved at the end of each line in the input file and how padding is added to the output file. There are two issues.
First, the output file padding. It …
1
vote
Accepted
pset3 Resize - Invalid or unsupported Image Format
Have you actually looked at the raw hex data contained in the program's output files? Notice anything interesting? Where is the bmp signature that's supposed to be in the first 2 bytes?
Next questio …
1
vote
Accepted
Is scan line not moving to the next line? I'm badly stuck. Please advice
Several issues here. First, look at the code that expands the line horizontally:
for (j = 0; j < biSmall.biWidth; j++)
{
// read RGB triple from infile
fread( …
1
vote
Accepted
PSET3 Resize (Less) - works in debug50 but segmentation error when executing
You have just learned an important lesson. Seg faults can be muted by debug environments. When this happens, you need to isolate the offending statement using printf statements to see how far execut …
0
votes
Accepted
Resize less comfortable (recopy method) need help
The main problem is that the code doesn't copy the struct data from the original header structs bi and bf to the new ones, new_bi or new_bf. That means that the headers that are written to the output …
1
vote
Accepted
Rewrite method in Resize (less) is printing wrong large.bmp
First, there are errors in calculating header data. That should be easy to fix.
The design logic for vertical scaling is totally flawed. Understand that images are not stored in two dimensions. The d …
2
votes
Accepted
CS50 - Pset3 - Resize (Less)
I would wager that you looked at the images but not at the raw data in the files. Since the header is correct, it tells any bmp viewer to display the amount of data that should be in the image, but if …
1
vote
Accepted
pset 3resize (less) how to store RGBTRIPLES in array
It's actually a structure, or a struct that is defined in the bmp.h file:
/**
* RGBTRIPLE
*
* This structure describes a color consisting of relative intensities of
* red, green, and blue.
*
* …