Specifically, could someone explain what the flags used with the commands are? In the pset4 specs at one point it is mentioned that they use a different value for -c depending upon the number of columns you want to output. I don't understand the values being used with the flags. I am trying to see the hex dump of my images for the resize problem and am having trouble viewing it. Thought maybe I am not using xxd the way its supposed to be used
1 Answer
Per xxd
's manual page, -c <cols>
formats <cols>
bytes per line. For example, -c 12
formats 12 bytes per line.
The -g <bytes>
groups each <bytes>
bytes of the <cols>
bytes per each line together. For example, -g 3
groups each 3 bytes of the 12 bytes, in a line, together.
The -s <seek>
starts at byte number <seek>
from the beginning of the file. For example, -s 54
starts at byte 54 from the beginning of the file.
-
Thanks Kareem! So I used xxd and the pixels of my result seem to match the staff's result on all test cases in Check50 but my code still doesn't pass check50. I don't get any errors with diff either. Could there be anything else Im missing out on? I could post the code/ mail it to you if you want to take a look at it Commented Jun 15, 2015 at 10:10
-
Oh and I checked my headers against the staff's using peek. Nothing there either Commented Jun 15, 2015 at 10:33
-
@sharvarimurthy you may email me with your code along with a link to this question!– kzidaneCommented Jun 15, 2015 at 12:42