Work 1: Imagine all the pixels...

posted Feb 3, 2017, 6:40 AM by JonAlf Dyrland-Weaver   [ updated Feb 3, 2017, 12:18 PM ]

Time for your first computer generated image:

  • Create a program that generates a valid ppm image file, it should be at least 500x500, but also don't make it too big (remember, each pixel is stored as 3 bytes - one for each color value - so a 1000x1000 image will be 8MB large, they get big fast).
  • Upload your code, as a submodule, to the appropriate place on github.
  • Convert your image to a png and upload it to the ML6 gallery website: http://nibbler.stuy.edu/webgallery/upload.py
    • For help with converting, you should install ImageMagick
      • on ubuntu, apt-get install imagemagick will work
      • on mac: 
        • First install XQuartz form here: https://www.xquartz.org/index.html
        •  (if you have homebrew installed): brew install imagemagick --with-x11 will work ( the --with-x11 flag is very necessary, and I've already spent the hours yelling at the internet trying to figure out what was wrong.
        • If you're more of a macports kind of person: port install imagemagick
      • on windows... installing ubuntu and running apt-get install imagemagick will work (I've been told imagemagick works on cygwin)
      • for more detailed instructions (including building and installing it on your own): http://www.imagemagick.org/script/binary-releases.php
      • You can also log into any stuy machine remotely, and run convert on them.
      • Once you've installed image magic, you can convert with the following command:
        • convert <source> <destination>
        • The destination format will be automatically set based on the file extension
        • example: convert foo.ppm foo.png
  • You must submit your code via github and upload an image!

github clone link:
https://github.com/mks66/picmaker.git
Comments