Skip to main content

Timeline for pset4 resize - fseek help (I think)

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Nov 4, 2015 at 19:29 comment added Bubi Cliff B, I salute you! Thanks for helping me out, finally it works. And not only does it work, but what more important is, I also understand why it works! Fantastic, thanks again for the help!
Nov 4, 2015 at 19:27 vote accept Bubi
Nov 4, 2015 at 19:21 comment added Bubi Update: It seems to do the image scaling correctly (I can't tell you how happy I was when I saw it) if I set the multiplier to 4, 8, 12 ... etc.. So only the paddig is out of place somehow. I'm so close, I can feel it in my bones!
Nov 3, 2015 at 22:11 comment added Bubi Hm, something still seems to be off. I have removed the parentheses that you have suggested, and then somewhat rewrote the fseek line. It looks like this atm: fseek(inptr, 54 + (i * oriwidth * sizeof(triple)) + oripadding * i, SEEK_SET); In my interpretation, this should: Skip over headers -> skip over i * lines (0 in the beginning) and skip over i* padding (0 in the beginning). I also relocated the for loop with the fputc in it, but somehting is still off. The image is at least the right color now, but it looks somewhat scrambled.
Nov 2, 2015 at 9:50 comment added Bubi Awesome! As soon as I get home, I'll try to implement it, checking this from work atm :)
Nov 1, 2015 at 22:42 history answered Cliff B CC BY-SA 3.0