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

Working with pixel size <= byte #538

Open
arkanoid87 opened this issue Apr 24, 2023 · 2 comments
Open

Working with pixel size <= byte #538

arkanoid87 opened this issue Apr 24, 2023 · 2 comments

Comments

@arkanoid87
Copy link

arkanoid87 commented Apr 24, 2023

Hello!

I work with large images for geosciences with Nim and I was looking for an efficient rasterizer while keeping everything in memory
To archieve this, working with sizeof(pixel) <= 8 bits is a must

Cairo has FORMAT_A1 and FORMAT_A8 for this
https://www.cairographics.org/documentation/pycairo/3/reference/constants.html#cairo-format

FORMAT_A8 is the easiest way to work on the gpu like

glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, image_data);

I strongly prefer a 100% Nim solution, is Pixie capable of working with single channel images?

@guzba
Copy link
Collaborator

guzba commented Apr 24, 2023

Hi, Pixie does not have multiple different image formats so will not meet this requirement.

It is complex to support many image data formats with optimized drawing code paths etc so this is not something I see myself working on since I do not need it.

@arkanoid87
Copy link
Author

arkanoid87 commented Apr 24, 2023

Thanks for the quick feedback!

I'll stick with Cairo then (until I figure out how to work with multiple independent uint8 layers packed as a multichannel pixie image)

should I close this issue, or keep it for votes?

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

No branches or pull requests

2 participants