magickQueryFormats function

List<String>? magickQueryFormats(
  1. String pattern
)

Returns any image formats that match the specified pattern (e.g. "*" for all).

  • Note: An empty list is returned if there are no results.

Implementation

List<String>? magickQueryFormats(String pattern) => using((Arena arena) {
      final Pointer<Char> patternPtr =
          pattern.toNativeUtf8(allocator: arena).cast();
      final Pointer<Size> numFormatsPtr = arena();
      final Pointer<Pointer<Char>> resultPtr =
          _magickWandBindings.MagickQueryFormats(patternPtr, numFormatsPtr);
      int numFormats = numFormatsPtr.value;
      final List<String>? result = resultPtr.toStringList(numFormats);
      _magickRelinquishMemory(resultPtr.cast());
      return result;
    });