magickGetImageArtifacts method
Returns all the artifact names that match the specified pattern associated
with a wand. Use magickGetImageProperty()
to return the value of a
particular artifact.
Implementation
List<String>? magickGetImageArtifacts(String pattern) => using((Arena arena) {
final Pointer<Char> patternPtr =
pattern.toNativeUtf8(allocator: arena).cast();
final Pointer<Size> numArtifactsPtr = arena();
final Pointer<Pointer<Char>> artifactsPtr =
_magickWandBindings.MagickGetImageArtifacts(
_wandPtr, patternPtr, numArtifactsPtr);
final int numArtifacts = numArtifactsPtr.value;
final List<String>? result = artifactsPtr.toStringList(numArtifacts);
_magickRelinquishMemory(artifactsPtr.cast());
return result;
});