Skip to content

Fix for ImageMagick 7#14

Open
dirk-zimoch wants to merge 1 commit into
areaDetector:masterfrom
dirk-zimoch:ImageMagick7
Open

Fix for ImageMagick 7#14
dirk-zimoch wants to merge 1 commit into
areaDetector:masterfrom
dirk-zimoch:ImageMagick7

Conversation

@dirk-zimoch

Copy link
Copy Markdown

ImageMagick 7 no longer has IntegerPixel. Instead it now defines LongPixel to have always 32 bits on all architectures. In ImageMagick 6, LongPixel had 32 or 64 bits, depending on the size of the native type long.

ImageMagick 7 no longer has `IntegerPixel`. Instead it now defines
`LongPixel` to have always 32 bits on all architectures.
In ImageMagick 6, `LongPixel` had 32 or 64 bits, depending on the
size of the native type `long`.
Comment thread urlApp/src/URLDriver.cpp
Comment on lines +123 to +127
#if MagickLibVersion >= 0x700
storageType = LongPixel;
#else
storageType = IntegerPixel;
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I would prefer a solution using <type_traits> instead of hardcoding library version numbers, but it might be less understandable, so I'm okay with this version as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

<type_traits> would require a C++11 compatible compiler. Not a very high hurdle nowadays but a new requirement.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

And it IS a version dependent change.

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

Successfully merging this pull request may close these issues.

2 participants