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

Support for cannyEdgeImage #102

Open
ProPixelMedia opened this issue Jun 19, 2024 · 2 comments
Open

Support for cannyEdgeImage #102

ProPixelMedia opened this issue Jun 19, 2024 · 2 comments

Comments

@ProPixelMedia
Copy link

I'm normally pretty good about searching Google, but literally can't find any information for cannyEdgeImage, other than this page. (plenty of info about Canny Edge Image, but only by using prompts, nothing about using it with PHP)

This page would otherwise be a jackpot, as it has a live example with adjustable parameters. However, even the live example fails if you try to change the parameters (sometimes). I can post the exact parameters that cause it to fail, but it only took a few tries to get it to fail.

I was hoping it was just a website bug so I tried to run this on my own server, but getting an error:
Fatal error: Uncaught Error: Call to undefined method Imagick::cannyEdgeImage() in ...

This is the ImageMagick version running on my server:
ImageMagick 6.9.10-68 Q16 x86_64 2024-01-12 https://imagemagick.org

Any info would be much appreciated

Reported from Imagick::cannyEdgeImage

@Danack
Copy link
Collaborator

Danack commented Jun 19, 2024

I can post the exact parameters that cause it to fail

Please can you do that.

This is the ImageMagick version running on my server:
ImageMagick 6.9.10-68 Q16 x86_64 2024-01-12

Ah, that there is the problem. Although there is some code related to CannyEdgeImage in that version of ImageMagick, it wasn't until ImageMagick version 7.0.9 that the 'canny edge' functionality was exposed in the MagickWand API.

Although it might be possible to access that functionality through the MagickCore api, I don't plan to do that myself.

@ProPixelMedia
Copy link
Author

HI Danack,

Thanks for your help. I think I figured out what is wrong with the parameters. I wasn't putting in the leading 0 in the decimal format. so if you put .33 instead of 0.33, then it breaks. I would recommend changing the script so that it doesn't require the leading 0, as its completely redundant.

I would love to upgrade to the newer version of imagemagick. It would certainly give me access to a bunch of new functions. However, I devoted about 5 hours trying to upgrade imagemagick on my servers, spent alot of time reading on forums, posted my issue on every forum I could find, no responses, and I sort of gave up. I have a new server and an old server. I was not able to do it on either one. I started a whole new thread about it weeks ago:

#101

At this point, I would pay for someone to help me install it, in case you know anyone that does that.

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