Skip to main content

Timeline for pset4 resize: how to copy a row

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Aug 14, 2016 at 12:30 vote accept Semyon Pilyukov
Aug 13, 2016 at 11:58 comment added Semyon Pilyukov Oh no, right answer is FILE* outptr = fopen(outfile, "w+")
Aug 13, 2016 at 11:11 comment added Semyon Pilyukov Please post it as an answer below, I'll give a check!
Aug 13, 2016 at 11:08 comment added Semyon Pilyukov God bless you!!!!! FILE* outptr = fopen(outfile, "w"); - thats way I could not read from it! Just fixed with FILE* outptr = fopen(outfile, "r+") and all works!!!!!
Aug 12, 2016 at 16:30 comment added Cliff B You have to read from the infile first to get the data. Once you've created the first copy of a line from the infile to the outfile, then you can read it from the outfile to make copies. Remember to open the outfile for both read and write.
Aug 12, 2016 at 13:32 comment added Semyon Pilyukov Thanks for your reply. As I understood Zamayla, there are two ways to resize the image vertically: 1) read-and widely write infile's row n times - this one I successfully implemented in other version of resize.c 2) copy just written row of outfile (n-1) times - I guess this is more efficient way. In this code I tried to implement 2nd way, thats way I read from outfile and write to outfile, but smth wrong(((
Aug 11, 2016 at 20:31 history answered Cliff B CC BY-SA 3.0