Readme#22
Open
meganreardon wants to merge 78 commits intocodefellows-seattle-javascript-401d12:masterfrom
Open
Readme#22meganreardon wants to merge 78 commits intocodefellows-seattle-javascript-401d12:masterfrom
meganreardon wants to merge 78 commits intocodefellows-seattle-javascript-401d12:masterfrom
Conversation
initial setup complete
helper and constructor skeleton complete
loading initial metadata
Needed to find the offset to the colors by checking the first int of the dib header for the size of the dib header. Colors immediately follow.
Added color table parsing
parsing the pixel array
Constructor now accepts a buffer as a param.
Moved parse code to the constructor
We now store the buffer as a property in our bitmaps. When you save a bitmap, it writes this buffer back to the supplied filename. NOTE: We currently have arrays for colors and pixels, but changes to those arrays will not alter the underlying buffer. We need to change our implementation to deal with this.
Implemented save method in the helper
The constructor method was not ideal, because by creating color and pixel arrays as properties, we were duplicating that data in memory. Not only that, but it would increase the complexity of the save operation to the point where our helper would have to be a bit smarter. The goal is to keep all the logic in the bitmap constructor file, and use the buffer directly inside.
Moved buffer access into getter methods
I added a bunch of notes on how to implement the methods.
I was missing " = function" in my prototype method declarations.
Update git ignore
Setter stubs
test file started
Test cases and TODOs
More or less using the same logic that we have to read pixels.
I used an external tool to rotate the image and save it to this file. The goal is for our transform to be able to match what my image editor produced. NOTE: Adding this to git, because it is a necessary test asset.
Needed to check for non-array param, and arrays with bunk pixel values.
Set pixel array error checks
Constructor test d
For #transform
Needed to get up to date with master.
grayscale transform test added and passes test
adds set color array and tests
Test transforms 1
Added expect().within()
Test that bitmap.transform() returns bitmap
Transform stripes
Also added a test for new Bitmap() without a buf param.
Bitmap error checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.