W
W
Wet_Dumplings2018-09-17 16:45:57
Python
Wet_Dumplings, 2018-09-17 16:45:57

How to hide text in an image by replacing the color palette?

Hello!
not replacing the lower bits {LBS} (I managed it myself)
There is such a picture (in BMP format) https://pp.userapi.com/c850532/v850532029/5eeb/Y7A... // (or just Malevich's square, in general, if without frills - the main thing is the presence of a certain color (s) in abundance)
Suppose I want to "sew" (and later find out what I "sewn") the text `glory to bfg` into it;
To do this, I created such an alphabet (made the assignment alphabet_alphabet=number) //or are there smart options?

a=1, b = 2, c=3, d=4, e=5, f = 6, g = 7, l = 12, o = 15, r = 18, t = 20, y = 25
(of course, without a comma a=1 , b=2)
Next, you need to replace the colors of the palette: "the first 51 color of the palette
is assigned black (the color of Malevich's square). The next 51 colors of the palette are assigned white
(the background color of Malevich's square)
Tobish needs to be done ( for example, he gave a sign - a page on the network: [ www.nestego.ru/2012/07/blog-post_31.html ] ) [_1_]
черный_цвет
код:____0______;1_______;3_______...50   
цвет:000000;000000;000000;...000000
     
        белый_цвет
код:____51______;52______;...101
цвет:FFFFFF;FFFFFF;FFFFFF

[_2_]
To hide information:
берётся первая точка изображения, анализируется её принадлежность к
определённой цветовой группе, например к группе чёрного цвета, затем этой точке
присваивается код текущего символа из файла-сообщения с учётом выбранной цветовой
группы. Например, для символа Б чёрной точке будет назначен цвет с кодом 1, а белой
точке – цвет с кодом 52.

Actually the question is: how to implement the moments:
[_1_] - - assigning the required color to the palette color [ _2_ ]
- the process itself did not understand at the "code level " , when used in picture)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-09-17
@dimonchik2013

https://github.com/RobinDavid/LSB-Steganography

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question