if (((*pProbe == KEY) && (*pProbeNext != KEY)) || ((*pProbe != KEY) && (*pProbeNext == KEY)))
{
- pWidthStretchable[index] = (*pProbe == KEY) ? true : false;
+ pWidthStretchable[index] = (*pProbe == KEY);
index++;
}
pProbe++;
pProbeNext++;
}
-// pRegionWidthes[index]++;
+
+ // in case of whole black
+ if (index == 0)
+ {
+ Pixel* pProbe = (Pixel*) (dstImage.pBitmap) + 1;
+ Pixel* pProbeEnd = pProbe + dstImage.width - 2;
+
+ if (pProbe < pProbeEnd)
+ {
+ pWidthStretchable[index] = (*pProbe == KEY);
+ }
+ }
return (index + 1);
}
if (((*pProbe == KEY) && (*pProbeNext != KEY)) || ((*pProbe != KEY) && (*pProbeNext == KEY)))
{
- pHeightStretchable[index] = (*pProbe == KEY) ? true : false;
+ pHeightStretchable[index] = (*pProbe == KEY);
index++;
}
pProbe += pitch;
pProbeNext += pitch;
}
-// pRegionHeights[index]++;
+
+ // in case of whole black
+ if (index == 0)
+ {
+ Pixel* pProbe = (Pixel*) (dstImage.pBitmap) + pitch;
+ Pixel* pProbeEnd = pProbe + (dstImage.height - 2) * pitch;
+
+ if (pProbe < pProbeEnd)
+ {
+ pHeightStretchable[index] = (*pProbe == KEY);
+ }
+ }
return (index + 1);
}