diff options
Diffstat (limited to 'src/main/dither-main.c')
-rw-r--r-- | src/main/dither-main.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/main/dither-main.c b/src/main/dither-main.c index 22ea02b..719421c 100644 --- a/src/main/dither-main.c +++ b/src/main/dither-main.c @@ -1,5 +1,5 @@ /* - * "$Id: dither-main.c,v 1.61 2008/07/04 14:29:28 rlk Exp $" + * "$Id: dither-main.c,v 1.62 2010/08/04 00:33:56 rlk Exp $" * * Dither routine entrypoints * @@ -393,20 +393,12 @@ stp_dither_init(stp_vars_t *v, stp_image_t *image, int out_width, } else { - stp_array_t *array; - int transposed; - array = stp_find_standard_dither_array(d->y_aspect, d->x_aspect); - transposed = d->y_aspect < d->x_aspect ? 1 : 0; - if (array) - { - stp_dither_set_matrix_from_dither_array(v, array, transposed); - stp_array_destroy(array); - } - else - { - stp_eprintf(v, "Cannot find dither matrix file! Aborting.\n"); - stp_abort(); - } + stp_array_t *array = + stp_find_standard_dither_array(d->y_aspect, d->x_aspect); + int transposed = d->y_aspect < d->x_aspect ? 1 : 0; + STPI_ASSERT(array, v); + stp_dither_set_matrix_from_dither_array(v, array, transposed); + stp_array_destroy(array); } d->src_width = in_width; |