Complete Phase 2 example with PPM file

Insertion

Message is "A test"

File for insertion is named specks.ppm

P3
10 7 
255
84 186 56  90 72 231  222 93 183  151 150 209  87 68 61  10 104 183  176 82 46
46 12 125  249 37 28  94 138 156  154 74 140  104 143 155  184 173 16  19 73 240
240 168 217  137 20 95  59 186 55  144 25 66  45 118 95  173 66 54  2 7 23
23 231 153  84 111 33  253 4 53  249 149 144  199 77 233  249 51 161  167 196 21
21 68 42  28 99 249  164 4 180  246 188 66  157 83 19  5 158 121  142 90 213
213 199 97  213 92 239  37 181 197  46 210 30  116 117 205  162 81 250  150 209 42
42 151 130  221 113 197  109 196 73  80 156 210  57 72 146  25 111 8  186 42 240
240 182 40  35 79 125  115 135 184  104 100 29  122 87 219  130 245 222  249 141 108
108 4 39  186 193 227  219 237 162  182 232 12  112 46 108  213 20 37  247 192 104
104 57 87  176 158 67  36 137 157  201 244 50  176 36 157  104 72 16  107 29 250

Length of message = 6
in 3 digits that is 006

skip the header

use the first three Red numbers (out of the RGB triples)

80 186 56  90 72 231  226 93 183  

ASCII codes for "A test" = 065 032 116 101 115 116
80 186 56  90 72 231  226 93 183  150 150 209  86 68 61  15 104 183  170 82 46
43 12 125  242 37 28  91 138 156  151 74 140  106 143 155  181 173 16  10 73 240
241 168 217  131 20 95  51 186 55  145 25 66  41 118 95  171 66 54  6 7 23
the rest of the rows remain the same
All bold digits are part of the message inserted.