Open sakshitporwal opened 1 week ago
@sakshitporwal can you provide steps to reproduce this issue? I have tried with a slightly modified version of the example project and can't reproduce.
import 'dart:io';
import 'package:steganograph/steganograph.dart';
void main() async {
final file = await Steganograph.cloak(
image: File('example/assets/scribble.png'),
message: "Insert some really top secret message here!",
outputFilePath: 'example/assets/result.png',
);
final embeddedMessage = await Steganograph.uncloak(File(file!.path));
print(embeddedMessage);
final coverImage = File('example/assets/scribble.png');
final coverImageBytes = await coverImage.readAsBytes();
final stegoImageBytes = await Steganograph.cloakBytes(
imageBytes: coverImageBytes,
message: 'Some other secret message',
);
// calling cloakBytes on stegoImageBytes which already contains a message doesn't fail here
final anotherStegoImageBytes = await Steganograph.cloakBytes(
imageBytes: stegoImageBytes!,
message: 'Yea yea',
);
final message = await Steganograph.uncloakBytes(stegoImageBytes);
final anotherMessage = await Steganograph.uncloakBytes(
anotherStegoImageBytes!,
);
print(message);
print(anotherMessage);
}
How are you getting your Uint8List which already contains a message?
If you try to use cloackBytes method on Uint8List which already contains a message It throws an error Image format not Supported