Giter Site home page Giter Site logo

cs430_project1's Introduction

ppmrw

CS430 - Project 1 (Images)

Christopher Robert Philabaum

Northern Arizona University (Fall 2016)

ppmrw is a tool that allows one to convert from one format of PPM to another (P3 and P6, aka. ASCII or raw binary).

See official ppm format for further reference.

Note:

  • This program does not support P1, P2, P4, P5, or P7.
  • This program does not support 2-byte channels (aka. >= 256 and <= 65535 values).
  • All forms of comments following any whitespace or value in the header are taken into account and properly ignored in parsing.
  • The program should format the output file properly by never exceeding 70 characters (as per the documentation). Pixels are spaced with three characters (except when reaching the character limit), and channels / samples are separated by a single space. Rows are spaced by an extra new line.

Usage

ppmrw [3|6] /path/to/input.ppm /path/to/output.ppm

parameters:

  1. mode: Indicates the output format to write, 3 (as in P3) for ASCII, or 6 (as in P6) for binary.
  2. inputFile: A valid path, absolute or relative (to pwd), to the input file.
  3. outputFile: A valid path, absolute or relative (to pwd), to the output file.

All parameters are required and not optional. All parameters must be used in the exact order provided above.

Compile

make: Compiles the program into out/ as out/ppmrw

make clean: Removes all object code and the out/ directory altogether

Grader Notes

  • Because make compiles ppmrw to out/, in order to run it properly it should be used as out/ppmrw [3|6] /path/to/input.ppm /path/to/output.ppm.
  • I have two test images in the img/ directory, one for ASCII/text, and one for binary.
  • Even though I have .clang_complete as a file, this is only used in conjunction with a package for Atom, and the Makefile properly uses gcc instead.
  • The output file should contain the line/comment "# Created with ppmrw (Christopher Philabaum <[email protected]>)" following the magic number.

cs430_project1's People

Contributors

giantdarth avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.