magickSetImageProfile method

bool magickSetImageProfile(
  1. String name,
  2. Uint8List profile
)

Adds a named profile to the magick wand. If a profile with the same name already exists, it is replaced. This method differs from the MagickProfileImage() method in that it does not apply any CMS color profiles.

Implementation

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