Skip to content

Commit

Permalink
Add license and README, also commented out tests for future use
Browse files Browse the repository at this point in the history
  • Loading branch information
DanLombardy committed Nov 3, 2015
1 parent e5b1079 commit 4911440
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 3 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2013-2015 Fractal <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
*******BITMAP Transformer*******

*****CONTRIBUTORS*****
* Dustin Noyes
* David Park
* Dan Lombardy

*****DESCRIPTION*****
The Bitmap Transformer takes a bitmap and adds a useful transform to it. As of version 0.1.0, the available transforms are:
* GRAYSCALE the bitmap
* Reverse the bitmap
* Streak diagonal gray lines across the bitmap

*****EXAMPLE*****
Running Bitmap Transformer couldn't be easier. From the root directory of Bitmap Transformer, run:
node index.js

You will see a screen that welcomes you and then asks you pick a transformation type, like so:

Welcome to the bitmap transformer
Please select an option:
1. Make It Grayscale
2. Make It Backwards
3. Make It Streaked
Enter an option:

Simply enter your transformation type and you will see a version of the bitmap with that transformation created in the root directory of the Bitmap Transformer.


*****MOTIVATION*****
Initially built as a proof of concept to provide a way to easily grayscale a bitmap, the project then expanded into a way to provide several simple transforms that a user might want to apply to the bitmap.


*****INSTALLATION*****
The project is hosted on https://github.com/haverchuck/bitmapTransformer. If you would like to use the project, fork the repo and clone it into your own repository.

Then, to make sure you have gulp and prompt, run the following command in your projects root directory:
npm install



*****TESTS*****
For now, our testing is available as Dev Dependencies. If the project goes into production these options might be limited or removed.

For now, to run tests for all the modules, enter:
mocha

To run our linter, jshint,enter:
gulp jshint

*****LICENSE*****
License is MIT, and as such, completely open source. Please see LICENSE for detailed information.
7 changes: 4 additions & 3 deletions test/transform-translate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ describe('translates buffer to array and back to buffer', function(){
];
expect(palette.takeTransform(testArry, 20).readInt8(1)).to.equal(2);
});

/* New functionality to be added later
it('takes a transform and a bitmap, applies it to bitmap, and returns new bitmap', function(){
palette.prepBMP(transform.transformList.Color_Make_It_Grayscale, __dirname + '/../lib/bitmap1.bmp', 'Color_Make_It_Grayscale');
var bufferCheck = fs.readFileSync(__dirname + '/../_Make_It_Grayscale.bmp');
//console.log(bufferCheck.readUInt8(0));
});
});*/
});

describe('translates pixel to buffer, applies transform, and to new buffer', function(){
Expand All @@ -63,11 +63,12 @@ describe('translates pixel to buffer, applies transform, and to new buffer', fun
expect(buf.readInt8(0)).to.equal(1);

});

/* New functionality to be added later
it('take updated pixel data and write to new file', function(){
pixel.prepBMP(transform.transformList.Pixel_Make_It_Backwards, __dirname + '/../lib/bitmap1.bmp', 'Pixel_Make_It_Backwards');
var bufferCheck = fs.readFileSync(__dirname + '/../_Make_It_Backwards.bmp');
//console.log(bufferCheck.readUInt8(0));
});
*/

});

0 comments on commit 4911440

Please sign in to comment.