|
|
@@ -1146,7 +1146,7 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) {
|
|
|
return;
|
|
|
}
|
|
|
for (int p = 0; p < imgsize; ++p) {
|
|
|
- for (uchar s = 0; s < format.size(); ++s) {
|
|
|
+ for (unsigned char s = 0; s < format.size(); ++s) {
|
|
|
signed char component = -1;
|
|
|
if (format.at(s) == 'B' || (cdata->_num_components <= 2 && format.at(s) != 'A')) {
|
|
|
component = 0;
|
|
|
@@ -1178,7 +1178,7 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) {
|
|
|
return;
|
|
|
}
|
|
|
for (int p = 0; p < imgsize; ++p) {
|
|
|
- for (uchar s = 0; s < format.size(); ++s) {
|
|
|
+ for (unsigned char s = 0; s < format.size(); ++s) {
|
|
|
signed char component = -1;
|
|
|
if (format.at(s) == 'B' || (cdata->_num_components <= 2 && format.at(s) != 'A')) {
|
|
|
component = 0;
|
|
|
@@ -8023,7 +8023,7 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
|
|
for (int j = y_size-1; j >= 0; j--) {
|
|
|
const xel *row = array + j * x_size;
|
|
|
for (int i = 0; i < x_size; i++) {
|
|
|
- *p++ = (uchar)PPM_GETB(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETB(row[i]);
|
|
|
}
|
|
|
p += row_skip;
|
|
|
}
|
|
|
@@ -8036,8 +8036,8 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
|
|
const xel *row = array + j * x_size;
|
|
|
const xelval *alpha_row = alpha + j * x_size;
|
|
|
for (int i = 0; i < x_size; i++) {
|
|
|
- *p++ = (uchar)PPM_GETB(row[i]);
|
|
|
- *p++ = (uchar)alpha_row[i];
|
|
|
+ *p++ = (unsigned char)PPM_GETB(row[i]);
|
|
|
+ *p++ = (unsigned char)alpha_row[i];
|
|
|
}
|
|
|
p += row_skip;
|
|
|
}
|
|
|
@@ -8045,8 +8045,8 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
|
|
for (int j = y_size-1; j >= 0; j--) {
|
|
|
const xel *row = array + j * x_size;
|
|
|
for (int i = 0; i < x_size; i++) {
|
|
|
- *p++ = (uchar)PPM_GETB(row[i]);
|
|
|
- *p++ = (uchar)255;
|
|
|
+ *p++ = (unsigned char)PPM_GETB(row[i]);
|
|
|
+ *p++ = (unsigned char)255;
|
|
|
}
|
|
|
p += row_skip;
|
|
|
}
|
|
|
@@ -8057,9 +8057,9 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
|
|
for (int j = y_size-1; j >= 0; j--) {
|
|
|
const xel *row = array + j * x_size;
|
|
|
for (int i = 0; i < x_size; i++) {
|
|
|
- *p++ = (uchar)PPM_GETB(row[i]);
|
|
|
- *p++ = (uchar)PPM_GETG(row[i]);
|
|
|
- *p++ = (uchar)PPM_GETR(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETB(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETG(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETR(row[i]);
|
|
|
}
|
|
|
p += row_skip;
|
|
|
}
|
|
|
@@ -8072,10 +8072,10 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
|
|
const xel *row = array + j * x_size;
|
|
|
const xelval *alpha_row = alpha + j * x_size;
|
|
|
for (int i = 0; i < x_size; i++) {
|
|
|
- *p++ = (uchar)PPM_GETB(row[i]);
|
|
|
- *p++ = (uchar)PPM_GETG(row[i]);
|
|
|
- *p++ = (uchar)PPM_GETR(row[i]);
|
|
|
- *p++ = (uchar)alpha_row[i];
|
|
|
+ *p++ = (unsigned char)PPM_GETB(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETG(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETR(row[i]);
|
|
|
+ *p++ = (unsigned char)alpha_row[i];
|
|
|
}
|
|
|
p += row_skip;
|
|
|
}
|
|
|
@@ -8083,10 +8083,10 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
|
|
for (int j = y_size-1; j >= 0; j--) {
|
|
|
const xel *row = array + j * x_size;
|
|
|
for (int i = 0; i < x_size; i++) {
|
|
|
- *p++ = (uchar)PPM_GETB(row[i]);
|
|
|
- *p++ = (uchar)PPM_GETG(row[i]);
|
|
|
- *p++ = (uchar)PPM_GETR(row[i]);
|
|
|
- *p++ = (uchar)255;
|
|
|
+ *p++ = (unsigned char)PPM_GETB(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETG(row[i]);
|
|
|
+ *p++ = (unsigned char)PPM_GETR(row[i]);
|
|
|
+ *p++ = (unsigned char)255;
|
|
|
}
|
|
|
p += row_skip;
|
|
|
}
|