Merge pull request #1567 from ilya-lavrenov:warn_fix

This commit is contained in:
Roman Donchenko
2013-10-08 13:50:49 +04:00
committed by OpenCV Buildbot
23 changed files with 98 additions and 98 deletions

View File

@@ -406,9 +406,9 @@ bool TiffDecoder::readHdrData(Mat& img)
TIFFGetField( tif, TIFFTAG_PHOTOMETRIC, &photometric );
TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT);
int size = 3 * m_width * m_height * sizeof (float);
int strip_size = 3 * m_width * rows_per_strip;
tstrip_t strip_size = 3 * m_width * rows_per_strip;
float *ptr = img.ptr<float>();
for (size_t i = 0; i < TIFFNumberOfStrips(tif); i++, ptr += strip_size)
for (tstrip_t i = 0; i < TIFFNumberOfStrips(tif); i++, ptr += strip_size)
{
TIFFReadEncodedStrip(tif, i, ptr, size);
size -= strip_size * sizeof(float);

View File

@@ -174,12 +174,12 @@ bool WebPDecoder::readData(Mat &img)
if (channels == 3)
{
res_ptr = WebPDecodeBGRInto(data.data, data.total(), out_data,
out_data_size, img.step);
(int)out_data_size, (int)img.step);
}
else if (channels == 4)
{
res_ptr = WebPDecodeBGRAInto(data.data, data.total(), out_data,
out_data_size, img.step);
(int)out_data_size, (int)img.step);
}
if(res_ptr == out_data)
@@ -255,22 +255,22 @@ bool WebPEncoder::write(const Mat& img, const std::vector<int>& params)
{
if(channels == 3)
{
size = WebPEncodeLosslessBGR(image->data, width, height, image->step, &out);
size = WebPEncodeLosslessBGR(image->data, width, height, (int)image->step, &out);
}
else if(channels == 4)
{
size = WebPEncodeLosslessBGRA(image->data, width, height, image->step, &out);
size = WebPEncodeLosslessBGRA(image->data, width, height, (int)image->step, &out);
}
}
else
{
if(channels == 3)
{
size = WebPEncodeBGR(image->data, width, height, image->step, quality, &out);
size = WebPEncodeBGR(image->data, width, height, (int)image->step, quality, &out);
}
else if(channels == 4)
{
size = WebPEncodeBGRA(image->data, width, height, image->step, quality, &out);
size = WebPEncodeBGRA(image->data, width, height, (int)image->step, quality, &out);
}
}