initMultimedia function
Future<void>
initMultimedia(
{ - bool ffi = true,
- bool initMagick = true,
- bool testConversion = false,
- File? overrideLibrary,
})
Implementation
Future<void> initMultimedia(
{bool ffi = true,
bool initMagick = true,
bool testConversion = false,
File? overrideLibrary}) async {
if (_initialized) {
return;
}
_initialized = true;
if (!ffi) {
multimediaFFIMode = false;
return;
}
try {
_load("image_magick_ffi", overrideLibrary);
if (initMagick) {
initializeImageMagick();
}
if (testConversion) {
await _testSupportedFormats();
}
} catch (e, es) {
print("Failed to initialize ImageMagick: $e");
print(es);
}
}