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

Create MagickWand and fill with raw RGBA #95

Open
Jacherr opened this issue Jun 8, 2022 · 2 comments
Open

Create MagickWand and fill with raw RGBA #95

Jacherr opened this issue Jun 8, 2022 · 2 comments

Comments

@Jacherr
Copy link

Jacherr commented Jun 8, 2022

Might be an easily answered question if I looked harder, but is it possible to take a raw RGBA buffer and pass it to ImageMagick using this crate?

I imagine it will be some mixture of read_image_blob, but I need some way to tell ImageMagick the dimensions of the image. Am I on the right track, or is this not possible at the moment?

@nlfiedler
Copy link
Owner

I don't know enough about ImageMagick to know, hopefully someone else can chime in.

@jshrake
Copy link
Contributor

jshrake commented Feb 6, 2023

This is possible using MagickWand::import_image_pixels method (https://imagemagick.org/api/magick-image.php#MagickImportImagePixels). See this PR #99, which improves the existing API and adds a unit test that demonstrates how to use it.

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

3 participants