This is my code to take an ArrayList of 8*8 blocks of an image (Bmp) and it's not working. What is the flaw of the logic here? 'rows' is the number of rows of the image. I am doing my video steganography project.
int x = 0;
int colCount = 0;
int yStart = 0;
int yLimit = 8;
for (x = 0;x < rows; x++)
{
while (yStart<yLimit)
{
imageBlock[x % 8, yStart % 8] = image_array[0].Data[x, yStart, 1];
if (x % 8 == 7 && yStart % 8 == 7)
{
blockList.Add(ForwardDCT(imageBlock));
}
yStart++;
}
if (x == rows - 1)
{
x = 0;
yLimit = yLimit + 8;
//yStart = yStart + 8;
colCount++;
if (colCount == 100)
{
break;
}
}
if (yStart % 8 == 7)
{
yStart = yLimit - 8;
}
}