embed static method
Implementation
static Uint8List embed(Uint8List imageBytes, Uint8List data) {
if (data.length < _robustHeaderLen || !_matchesMagic(data, 0, _magic)) {
throw ArgumentError('INVALID_PAYLOAD');
}
final jpegBytes = toJpegQ92(imageBytes);
if (jpegBytes == null) {
throw ArgumentError('INVALID_PNG');
}
final result = _native.dctEmbed(jpegBytes, data);
if (result == null) {
throw StateError('EMBED_FAILED');
}
return result;
}