diff --git a/build/my_build b/build/my_build index 0928771c..d61c9471 100755 --- a/build/my_build +++ b/build/my_build @@ -58,7 +58,7 @@ if [ -n "$CC" ]; then echo "C compiler $CC" fi -sde_gcc="$sde_top_dir/bin/gcc" +#sde_gcc="$sde_top_dir/bin/gcc" sde_setup="$sde_top_dir/bin/sde_make_setup" eval $("$sde_setup") || panic "setup failed" @@ -70,9 +70,9 @@ fi opts=() opts+=(-B"$build_dir") opts+=(-H"$source_dir") -if [ -n "$sde_top_dir" ]; then - opts+=("-DCMAKE_C_COMPILER=$sde_gcc") -fi +#if [ -n "$sde_top_dir" ]; then +# opts+=("-DCMAKE_C_COMPILER=$sde_gcc") +#fi opts+=("-DCMAKE_INSTALL_PREFIX=$install_dir") opts+=("-DJAS_ENABLE_STRICT=true") if [ "$enable_debug" -ne 0 ]; then diff --git a/src/libjasper/jp2/jp2_enc.c b/src/libjasper/jp2/jp2_enc.c index 9a5e106a..af4d9a41 100644 --- a/src/libjasper/jp2/jp2_enc.c +++ b/src/libjasper/jp2/jp2_enc.c @@ -115,6 +115,11 @@ int jp2_encode(jas_image_t *image, jas_stream_t *out, const char *optstr) iccstream = 0; iccprof = 0; + if (jas_image_numcmpts(image) < 1) { + jas_eprintf("image must have at least one component\n"); + goto error; + } + allcmptssame = 1; sgnd = jas_image_cmptsgnd(image, 0); prec = jas_image_cmptprec(image, 0);