magickProfileImage method

bool magickProfileImage(
  1. String name,
  2. Uint8List? profile
)

Adds or removes a ICC, IPTC, or generic profile from an image. If the profile is NULL, it is removed from the image otherwise added. Use a name of '*' and a profile of NULL to remove all profiles from the image.

Implementation

bool magickProfileImage(String name, Uint8List? profile) => using(
      (Arena arena) {
        final Pointer<UnsignedChar> profilePtr =
            profile?.toUnsignedCharArrayPointer(allocator: arena) ?? nullptr;
        final Pointer<Char> namePtr =
            name.toNativeUtf8(allocator: arena).cast();
        return _magickWandBindings.MagickProfileImage(
          _wandPtr,
          namePtr,
          profilePtr.cast(),
          profile?.length ?? 0,
        ).toBool();
      },
    );