/*
* Strip -> strip for change in encoding.
*/
bool cpDecodedStrips(Tiff inImage, Tiff outImage, int imagelength, int imagewidth, short spp)
{
int stripsize = inImage.StripSize();
byte[] buf = new byte[stripsize];
int ns = inImage.NumberOfStrips();
int row = 0;
for (int s = 0; s < ns; s++)
{
int cc = (row + m_rowsperstrip > imagelength) ? inImage.VStripSize(imagelength - row) : stripsize;
if (inImage.ReadEncodedStrip(s, buf, 0, cc) < 0 && !m_ignore)
{
Tiff.Error(inImage.FileName(), "Error, can't read strip {0}", s);
return false;
}
if (outImage.WriteEncodedStrip(s, buf, cc) < 0)
{
Tiff.Error(outImage.FileName(), "Error, can't write strip {0}", s);
return false;
}
row += m_rowsperstrip;
}
return true;
}