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

GetImage without transparency and black and white mode #11

Closed
zs-dima opened this issue Mar 12, 2020 · 3 comments
Closed

GetImage without transparency and black and white mode #11

zs-dima opened this issue Mar 12, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@zs-dima
Copy link

zs-dima commented Mar 12, 2020

Thanks for the awesome library
It could be nice to have GetImage() method to retrieve bitmap array without transparency
And maybe black and white bitmap array option as well
There are many cases where transparency will take just additional memory - for example documents to OCR and etc
PDF mostly contains documents so it could be useful cases

@Modest-as
Copy link
Member

Hey, thanks for the kind words. I am constantly looking for good new features to add while keeping the library very lightweight and fast and with no external dependencies. The latter especially requires some trade offs, by far the most confusing bit for the users is that library returns bitmap array instead of for example jpeg or png bytes that they can just save to a disk or something along these lines. All of that was done because I really do not want to add System.Drawing dependency to the core library which would add requirements to setup GDI dependencies on linux systems which is always annoying if you are running inside a container or just on bare metal. But I like this idea just adding some bitmap array post processors that you can optionally inject to format the output for transparency or greyscale might be useful to many. Will investigate more next time around I am working on some improvements.

@Modest-as Modest-as added the enhancement New feature or request label Mar 13, 2020
@zs-dima
Copy link
Author

zs-dima commented Mar 17, 2020

Thanks a lot
Keen to see transparency or greyscale options update
Have a great day

@Modest-as
Copy link
Member

Hey, I have released a new version of docnet 2.0.0 with few breaking API changes. It also includes image transparency removal behavior, I decided against implementing greyscale support since that would modify the returning byte array from BGRA mode to something else thus it would be confusing for the users if the return type differs, but feel free to modify the returning image without transparency however you see fit

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

No branches or pull requests

2 participants