Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Re-Write #24

Open
wants to merge 90 commits into
base: master
Choose a base branch
from

Conversation

hipstersmoothie
Copy link

I did a rewrite of the library in typescript. It helps formalize the code a little bit.

Things I added:

  • tslint for linting
  • prettier formatting
  • encoding for 1, 4, 8, 16, and 32 bit
  • integrated other pull requests
  • set up circleci + codecov on my fork. I can set it up here if you give me access or i can guide you through setup
  • Almost fully tested the code. there are a few branches that i haven't found test images for. it currently ~97%

I understand if you don't want to merge this. I can release it as bmp-ts if you decide not to. If you do decide you are okay with merging this I need to change a few things back but it shouldn't be hard.

Thanks for the awesome library!

@hipstersmoothie
Copy link
Author

@shaozilee thoughts?


private parseRGBA() {
this.data = Buffer.alloc(this.width * this.height * 4);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice additional feature to support is blank space at the end of the header. You can achieve this by using the offset that you parsed earlier and moving pos to that location before extracting pixel data.

Suggested change
this.pos = this.offset;

@BobBuehler
Copy link

I need the mask support that this adds as well as the offset support that I just suggested.
@shaozilee do you need assistance with the code review? I have TypeScript experience.

@thbl
Copy link

thbl commented Apr 23, 2019

@hipstersmoothie would you release it as bmp-ts ?
or could you tell me how to build it ?
Thanks

@hipstersmoothie
Copy link
Author

@BobBuehler @thbl I have released my fork as bmp-ts

https://www.npmjs.com/package/bmp-ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants