blocks = Partition[ImageData[original], {8, 8, 3}, {8, 8}];
modifiedBlocks = blocks;
alpha = 2;
Do[
  electedPixels = blocks[[i, j]] mask; 
  flatSelected = Flatten[selectedPixels, 1];
  lumB1 = flatSelected.lumCoeffs;
  meanL1 = Mean[lumB1];
  invertedMask = BitXor[mask, 1];
  unselectedPixels = blocks[[i, j]] invertedMask;
  flatUnselected = Flatten[unselectedPixels, 1];
  lumB0 = flatUnselected.lumCoeffs;
  meanL0 = Mean[lumB0];
  dl1 = If[meanL0 - meanL1 > alpha, 1, 
    If[meanL0 - meanL1 < -alpha, 0, 0]];
  deltaVector = dl1*lumCoeffs;
  
  deltaArray = ConstantArray[deltaVector, {8, 8}]*mask;
  modifiedBlocks[[i, j]] = blocks[[i, j]] + deltaArray;
  modifiedBlocks[[i, j]] = Clip[modifiedBlocks[[i, j]], {0, 1}],
  
  {i, Length[modifiedBlocks]}, {j, Length[modifiedBlocks[[1]]]}
  ];
stegoImage = ImageAssemble[modifiedBlocks];
Export["C:\\Users\\Я\\Pictures\\stego.bmp", stegoImage]; исправь у этого кода эти ошибки General::stop: Further output of Partition::pttl will be suppressed during this calculation. >>Partition::pttl: Partition arguments {8,8,3} and {8,8} must be the same length (since both are lists). >>General::stop: Further output of Thread::tdlen will be suppressed during this calculation. >>Thread::tdlen: Objects of unequal length in {{0.631373,0.6,0.556863},{0.631373,0.6,0.556863},{0.627451,0.596078,0.552941},<<46>>,{0.623529,0.607843,0.560784},<<1230>>}+{{{<<1>>},<<6>>,<<1>>},{<<1>>},<<4>>,{<<1>>},{<<1>>}} cannot be combined. >>Thread::tdlen: Objects of unequal length in {{0.631373,0.6,0.556863},{0.631373,0.6,0.556863},{0.627451,0.596078,0.552941},<<46>>,{0.623529,0.607843,0.560784},<<1230>>} {{0,0,0,0,1,0,1,0},<<6>>,{1,0,0,<<3>>,1,1}} cannot be combined. >>Thread::tdlen: Objects of unequal length in {{0.631373,0.6,0.556863},{0.631373,0.6,0.556863},{0.627451,0.596078,0.552941},<<46>>,{0.623529,0.607843,0.560784},<<1230>>} {{1,1,1,1,0,1,0,1},<<6>>,{0,1,1,<<3>>,0,0}} cannot be combined. >>Partition::pttl: Partition arguments {8,8,3} and {8,8} must be the same length (since both are lists). >>General::stop: Further output of Thread::tdlen will be suppressed during this calculation. >>Thread::tdlen: Objects of unequal length in {{{0.299 If[Plus[<<2>>]>2,1,0],0.587 If[Plus[<<2>>]>2,1,0],0.114 If[Plus[<<2>>]>2,1,0]},{0.299 If[Plus[<<2>>]>2,1,0],0.587 If[Plus[<<2>>]>2,1,0],0.114 If[Plus[<<2>>]>2,1,0]},<<5>>,{0.299 If[Plus[<<2>>]>2,1,0],0.587 If[Plus[<<2>>]>2,1,0],0.114 If[Plus[<<2>>]>2,1,0]}},<<6>>,{<<1>>}} <<1>> cannot be combined. >>Thread::tdlen: Objects of unequal length in {{<<1>>}} {{0,0,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,0,<<70>>},{1,0,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,<<70>>},<<48>>,<<110>>} Thread::tdlen: Objects of unequal length in {{<<1>>}} {{1,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,0,1,0,1,<<70>>},{0,1,1,0,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,<<70>>},<<48>>,<<110>>} cannot be combined. >>cannot be combined. >>General::stop: Further output of Thread::tdlen will be suppressed during this calculation. >>