From eaf34b8f13d22b35acf2e07775c12ae5ccd615fd Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 17 Mar 2022 15:02:29 +0000 Subject: [PATCH] remove openjpeg bpp handling it's deprecated --- libvips/foreign/jp2kload.c | 7 +++---- libvips/foreign/jp2ksave.c | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/libvips/foreign/jp2kload.c b/libvips/foreign/jp2kload.c index eed5472e..4496f0d9 100644 --- a/libvips/foreign/jp2kload.c +++ b/libvips/foreign/jp2kload.c @@ -348,9 +348,9 @@ vips_foreign_load_jp2k_print( VipsForeignLoadJp2k *jp2k ) "x0 = %u, y0 = %u\n", i, this->dx, this->dy, this->w, this->h, this->x0, this->y0 ); - printf( " prec = %d, bpp = %x, sgnd = %x, " + printf( " prec = %d, sgnd = %x, " "resno_decoded = %u, factor = %u\n", - this->prec, this->bpp, this->sgnd, + this->prec, this->sgnd, this->resno_decoded, this->factor ); printf( " data = %p, alpha = %u\n", this->data, this->alpha ); @@ -378,7 +378,7 @@ vips_foreign_load_jp2k_set_header( VipsForeignLoadJp2k *jp2k, VipsImage *out ) VipsBandFormat format; VipsInterpretation interpretation; - /* OpenJPEG only supports up to 31 bpp. Treat it as 32. + /* OpenJPEG only supports up to 31 bits per pixel. Treat it as 32. */ if( first->prec <= 8 ) format = first->sgnd ? VIPS_FORMAT_CHAR : VIPS_FORMAT_UCHAR; @@ -547,7 +547,6 @@ vips_foreign_load_jp2k_header( VipsForeignLoad *load ) } if( this->prec != first->prec || - this->bpp != first->bpp || this->sgnd != first->sgnd ) { vips_error( class->nickname, "%s", _( "components differ in precision" ) ); diff --git a/libvips/foreign/jp2ksave.c b/libvips/foreign/jp2ksave.c index f3094036..ab7b7751 100644 --- a/libvips/foreign/jp2ksave.c +++ b/libvips/foreign/jp2ksave.c @@ -600,7 +600,6 @@ vips_opj_image_create( OPJ_UINT32 numcmpts, comp->x0 = cmptparms[compno].x0; comp->y0 = cmptparms[compno].y0; comp->prec = cmptparms[compno].prec; - comp->bpp = cmptparms[compno].bpp; comp->sgnd = cmptparms[compno].sgnd; if( comp->h != 0 && @@ -700,7 +699,6 @@ vips_foreign_save_jp2k_new_image( VipsImage *im, comps[i].x0 = 0; comps[i].y0 = 0; comps[i].prec = bits_per_pixel; - comps[i].bpp = bits_per_pixel; comps[i].sgnd = !vips_band_format_isuint( im->BandFmt ); }