Skip to content

Commit eaf34b8

Browse files
committed
remove openjpeg bpp handling
it's deprecated
1 parent 168d765 commit eaf34b8

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

libvips/foreign/jp2kload.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ vips_foreign_load_jp2k_print( VipsForeignLoadJp2k *jp2k )
348348
"x0 = %u, y0 = %u\n",
349349
i, this->dx, this->dy, this->w, this->h,
350350
this->x0, this->y0 );
351-
printf( " prec = %d, bpp = %x, sgnd = %x, "
351+
printf( " prec = %d, sgnd = %x, "
352352
"resno_decoded = %u, factor = %u\n",
353-
this->prec, this->bpp, this->sgnd,
353+
this->prec, this->sgnd,
354354
this->resno_decoded, this->factor );
355355
printf( " data = %p, alpha = %u\n",
356356
this->data, this->alpha );
@@ -378,7 +378,7 @@ vips_foreign_load_jp2k_set_header( VipsForeignLoadJp2k *jp2k, VipsImage *out )
378378
VipsBandFormat format;
379379
VipsInterpretation interpretation;
380380

381-
/* OpenJPEG only supports up to 31 bpp. Treat it as 32.
381+
/* OpenJPEG only supports up to 31 bits per pixel. Treat it as 32.
382382
*/
383383
if( first->prec <= 8 )
384384
format = first->sgnd ? VIPS_FORMAT_CHAR : VIPS_FORMAT_UCHAR;
@@ -547,7 +547,6 @@ vips_foreign_load_jp2k_header( VipsForeignLoad *load )
547547
}
548548

549549
if( this->prec != first->prec ||
550-
this->bpp != first->bpp ||
551550
this->sgnd != first->sgnd ) {
552551
vips_error( class->nickname,
553552
"%s", _( "components differ in precision" ) );

libvips/foreign/jp2ksave.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,6 @@ vips_opj_image_create( OPJ_UINT32 numcmpts,
600600
comp->x0 = cmptparms[compno].x0;
601601
comp->y0 = cmptparms[compno].y0;
602602
comp->prec = cmptparms[compno].prec;
603-
comp->bpp = cmptparms[compno].bpp;
604603
comp->sgnd = cmptparms[compno].sgnd;
605604

606605
if( comp->h != 0 &&
@@ -700,7 +699,6 @@ vips_foreign_save_jp2k_new_image( VipsImage *im,
700699
comps[i].x0 = 0;
701700
comps[i].y0 = 0;
702701
comps[i].prec = bits_per_pixel;
703-
comps[i].bpp = bits_per_pixel;
704702
comps[i].sgnd = !vips_band_format_isuint( im->BandFmt );
705703
}
706704

0 commit comments

Comments
 (0)