Giter Club home page Giter Club logo

bitmap-transformer's Introduction

Bitmap Transformer

Overview

Build and run with args app/src/main/assets/baldy-8bit.bmp app/src/main/assets/ bitty:

  • args[0] filePath of input image;
  • args[1]filePath of output image;
  • args[2]filename of output image;

In this paired lab, you will work with a partner to build a bitmap transformer CLI.

Resources

  • Bitmap Specification

Setup

  • Create a new repo called bitmap-transformer for this paired lab, and ensure you’ve added your partner as a collaborator. Create a new Java application by running gradle init --type java-application.

Feature Tasks

For this assignment you will be building a bitmap (.bmp) transformer CLI. It will read a bitmap in from disk, run one or more color or raster transforms and then write it out to a new file. This project will require manipulating binary data. Your solution should be composed of small tested methods that solve specific problems. Your methods should be thoughtfully named and well documented. You should run ./gradlew run --args 'input output transform' to run your application. Your bitmap transformer modules should not use any third party libraries.

Minimum Requirements

  • The CLI should be architected using best modularization practices.
  • The CLI should contain a Bitmap class, and reading in a file should create a new Bitmap instance.
  • The CLI should require at least three arguments: input-file-path output-file-path transfrom-name.
  • The CLI should support a minimum of three transforms, each of which is an instance method in the Bitmap class.
  • The CLI should log useful Error messages if used incorrectly.
  • The CLI should log a success message on completion.

Testing

  • Use JUnit to define descriptive tests.
  • Each @Test method should aim to test a small well defined feature of a function.
  • Write tests to ensure each function behaves correctly with valid and invalid inputs.

Tips

You will want to define a strategy for solving the problem before you begin to code. Once you have a strategy defined, you can break it into steps that can be split into helper methods. Each helper method should solve a small specific problem. The main method should utilize the helper modules to execute your original strategy.

Example Strategy

  1. Gather user input (infile, outfile, and transform)
  2. Read the input bitmap file
  3. Parse the bitmap’s data into a Bitmap object (instance of a Bitmap class that you write)
  4. Using data from the parsed Bitmap, run a transform on the data directly (mutate the color or similar)
  5. Write the mutated image data to the output file path

Transform Ideas

Color Pallet Transforms

  • Invert
  • Randomize
  • Black and White
  • Darken or Lighten
  • Add or Multiply a Hue
  • Add or Subtract Contrast

Raster Data Transforms

  • Pixilate
  • Add a border
  • Add a watermark
  • Rotate
  • Vertically or Horizontally Mirror
  • Vertically or Horizontally Stretch

Documentation

  • Describe the transforms your program supports in README.md.

Collab, Credit and References

  • Paired Programmed: Tony Regalado and Josh McCluskey

Writing/Saving an Image Read and Write an Image BufferedImage: Get RGB Values Class ImageIO Class Color Class ImageIO StackOverflow

Refactor 03/05/2022 11:50PM

Included

  • args[0] filePath of input image;
  • args[1]filePath of output image;
  • args[2]filename of output image;
  • App runs from command line
  • Tests Built for all methods

User input feature maintained and commented out for assignment.

Work Time: 2 Hours

bitmap-transformer's People

Contributors

joshuamccluskey avatar edward-regalado avatar

Watchers

 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.