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

fix: declare argtypes for non-variadic arguments #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rayg-ssec
Copy link

Closes #178

This declares the non-variadic arguments for SetField and GetField, which is needed on ARM64 due to ABI differences (see issue #178 for discussion). This should not impact compatibility with other architectures.

Copy link
Collaborator

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'll let @pearu make the final decision.

If I understand the issue correctly, you could add a comment to mention that this is declared to allow proper function on ARM-based systems.

@djhoese djhoese added the bug label Mar 22, 2024
@pearcetm
Copy link

I'm interested in this fix as well. Are there additional things that need to be updated to support querying image data, as noted in #178 (comment)?

@pearu
Copy link
Owner

pearu commented Jul 1, 2024

Unfortunately, this fix is a problematic per the comment in the code: "GetField and SetField arguments are dependent on the tag", see also http://libtiff.maptools.org/man/TIFFGetField.3tiff.html that illustrates this dependency.

Considering the capabilities of ctypes, I think we cannot interface libtiff GetField functionality within pylibtiff in a platform independent way, or at least it would require a considerable effort to make it function correctly. The same functionality could be implemented by using TIFFVGetField but that requires using va_list from stdarg.h via ctypes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SegFault on Mac OSX with M2 chip / Ventura 13.4 trying to open TIFF Files
4 participants