poo123
poo123

Reputation: 69

android steganography

I'm trying to implement steganography on Android...but the bitmap gets compressed when it's stored, and that changes the pixel values. Is there any other way to store the image?

Thanks in advance!!

Upvotes: 0

Views: 2174

Answers (2)

Kiril Kirilov
Kiril Kirilov

Reputation: 11257

FileOutputStream fos = new FileOutputStream(filename);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);

Try passing 100 as maximum value of compress quality, in this way you will compress the bmp loosless.

Upvotes: 0

Fernando Miguélez
Fernando Miguélez

Reputation: 11316

You should use a lossless compression method for your application since common compression methods with losses such as JPG will ruin your watermark data as you have checked. Taking a look at Bitmap Compression formats it seems that only JPG and PNG compression formats are available. AFAIK png is a lossless compression method so you could use it to save your data.

Upvotes: 1

Related Questions