+ if (bytes_per_channel == 1) {
+ encode_buf[x] = in_buf[depth * x];
+ } else if (HAVE_BIGENDIAN ^ put_be) {
+ encode_buf[x + 1] = in_buf[depth * x];
+ encode_buf[x] = in_buf[depth * x + 1];
+ } else {
+ encode_buf[x] = in_buf[depth * x];
+ encode_buf[x + 1] = in_buf[depth * x + 1];
+ }