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

Allow extensions to access internal MagickWand objects #169

Open
jorissteyn opened this issue Jun 26, 2016 · 4 comments
Open

Allow extensions to access internal MagickWand objects #169

jorissteyn opened this issue Jun 26, 2016 · 4 comments

Comments

@jorissteyn
Copy link

jorissteyn commented Jun 26, 2016

Past versions of imagick included php_imagick_defs.h in installations of imagick (config.m4: PHP_INSTALL_HEADERS). This allowed other extensions to access the internal data of Imagick objects.

For example, the accessor php_imagick_get_class_entry allows extensions to handle Imagick objects, but in order to access the internal MagickWand, the extension needs to know at what offset the magic_wand field exists. Currently, the only way to know that is to include the definition of php_imagick_object.

See the pending discussion here and how I work around it in zbarcode.

@Danack
Copy link
Collaborator

Danack commented Jun 26, 2016

Past versions of imagick included php_imagick_defs.h in installations of imagick (config.m4: PHP_INSTALL_HEADERS).

I'm not aware of the change that you're referring to - can you do me a favour and link to the commit where you think something changed?

See the pending discussion here and how I work around it in zbarcode.

Is the link to the discussion meant to be a different link?

@Danack
Copy link
Collaborator

Danack commented Jun 26, 2016

Oh, i see - mkoppanen/php-zbarcode#21

But that change was done in 3.2.0RC1 - which was a 'while' ago: 9785713

I'll have a think - probably the best thing is making a proper function to get the MagickWand object from a zval that is a php_imagick_object

@jorissteyn
Copy link
Author

But that change was done in 3.2.0RC1

Ah I read that information wrong, thought it was more recent.

I think my actual request is not necessarily "restore the header" but a more general "help me fix the zbarcode use-case", I'll update the issue title accordingly.

making a proper function to get the MagickWand object from a zval that is a php_imagick_object

That sounds like a great solution!

@jorissteyn jorissteyn changed the title Restore php_imagick_defs.h in public headers of imagick 3.4.3 Allow extensions to access internal MagickWand objects Jun 27, 2016
@Caffe1neAdd1ct
Copy link

Any update on this one? Found a strange issue decoding barcodes with GD not always working compared with passing in an Imagick object, would be great to re-implement this integration with Imagick / zbarcode.

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