-
Notifications
You must be signed in to change notification settings - Fork 185
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
GradientImage and other paint functions not exposed? #157
Comments
If it is part of the ImageMagick 7 api then it is likely to be something that just wasn't exposed when the bindings were updated to support 7. We can expose missing api that is in the ImageMagick headers |
It's existed since ImageMagick 6, https://github.com/ImageMagick/ImageMagick/blob/ImageMagick-6/magick/paint.c#L426 . It looks like there might be some other types that will have to be exposed as well, as the method signature includes GradientType, SpreadMethod and PixelPacket. |
Alright. So I guess there is missing v6 api after all depends on when they
introduced it in v6. We have PixelPacket defined, but not the others.
…On Sun, Mar 18, 2018, 1:14 AM George Vilches ***@***.***> wrote:
It's existed since ImageMagick 6,
https://github.com/ImageMagick/ImageMagick/blob/ImageMagick-6/magick/paint.c#L426
. It looks like there might be some other types that will have to be
exposed as well, as the method signature includes GradientType,
SpreadMethod and PixelPacket.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARPxuMtEkC39GVbUi6DkzTEnSVW6HlHks5tfP47gaJpZM4Suqsr>
.
|
I've put up a pull request in #162 that maps this function as it is in IM6. The signature is different for IM7 ( https://github.com/ImageMagick/ImageMagick/blob/master/MagickCore/paint.c#L404 ), but if needed to accept the patch I could explore a version for that branch as well. |
I can try and test this against im7 this weekend |
Was going through these open issues and realised I never followed up on this. I ended up implementing the gradient support for im7. It was definitely a different API, although it has more control since you can have arbitrary color stops. |
There are several functions marked as MagicExport in paint.c that don't have a correlating method to get to them in this Go adapter. Is there a reason they're not exposed? Alternatively, is there a way that a user should call them otherwise?
In my particular case, I know that ReadImage("black-white") will call GradientImage, but there's no way to assign artifacts to a MagickWand, and the artifacts needs to exist on the Image itself (setting artifacts on an empty wand will error). But ReadImage creates a new image and then calls GradientImage immediately, so there's no way to set the artifacts using that workflow. So I guess the alternative question is, if GradientImage can't be exposed directly, is there a way to SetImageArtifact such that ReadImage can use them via the Go binding?
The text was updated successfully, but these errors were encountered: