File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1206,7 +1206,6 @@ function tiff (options) {
12061206 * Use these AVIF options for output image.
12071207 *
12081208 * AVIF image sequences are not supported.
1209- * Prebuilt binaries support a bitdepth of 8 only.
12101209 *
12111210 * When using Windows ARM64, this feature requires a CPU with ARM64v8.4 or later.
12121211 *
@@ -1297,9 +1296,6 @@ function heif (options) {
12971296 }
12981297 if ( is . defined ( options . bitdepth ) ) {
12991298 if ( is . integer ( options . bitdepth ) && is . inArray ( options . bitdepth , [ 8 , 10 , 12 ] ) ) {
1300- if ( options . bitdepth !== 8 && this . constructor . versions . heif ) {
1301- throw is . invalidParameterError ( 'bitdepth when using prebuilt binaries' , 8 , options . bitdepth ) ;
1302- }
13031299 this . options . heifBitdepth = options . bitdepth ;
13041300 } else {
13051301 throw is . invalidParameterError ( 'bitdepth' , '8, 10 or 12' , options . bitdepth ) ;
Original file line number Diff line number Diff line change @@ -93,17 +93,10 @@ suite('HEIF', () => {
9393 } ) ;
9494 } ) ;
9595 test ( 'valid bitdepth value does not throw an error' , ( t ) => {
96- t . plan ( 2 ) ;
97- const { heif } = sharp . versions ;
98- delete sharp . versions . heif ;
96+ t . plan ( 1 ) ;
9997 t . assert . doesNotThrow ( ( ) => {
10098 sharp ( ) . heif ( { compression : 'av1' , bitdepth : 12 } ) ;
10199 } ) ;
102- sharp . versions . heif = '1.2.3' ;
103- t . assert . throws ( ( ) => {
104- sharp ( ) . heif ( { compression : 'av1' , bitdepth : 10 } ) ;
105- } , / E r r o r : E x p e c t e d 8 f o r b i t d e p t h w h e n u s i n g p r e b u i l t b i n a r i e s b u t r e c e i v e d 1 0 o f t y p e n u m b e r / ) ;
106- sharp . versions . heif = heif ;
107100 } ) ;
108101 test ( 'invalid bitdepth value should throw an error' , ( t ) => {
109102 t . plan ( 1 ) ;
You can’t perform that action at this time.
0 commit comments