@@ -60,7 +60,7 @@ fn encode_decode(
6060 // encode
6161 let mut encoded = Vec :: new ( ) ;
6262 let mut encoder = Encoder :: new_image ( & mut encoded, image. size , format, false ) . unwrap ( ) ;
63- encoder. encoding = options. clone ( ) ;
63+ encoder. options = options. clone ( ) ;
6464 encoder. write_surface ( image. view ( ) ) . unwrap ( ) ;
6565 encoder. finish ( ) . unwrap ( ) ;
6666
@@ -117,8 +117,8 @@ fn encode_base() {
117117
118118 let mut output = Vec :: new ( ) ;
119119 let mut encoder = Encoder :: new_image ( & mut output, size, format, false ) ?;
120- encoder. encoding . quality = CompressionQuality :: High ;
121- encoder. encoding . parallel = false ;
120+ encoder. options . quality = CompressionQuality :: High ;
121+ encoder. options . parallel = false ;
122122
123123 // and now the image data
124124 if format. precision ( ) == Precision :: U16 {
@@ -161,8 +161,8 @@ fn encode_dither() {
161161 ) -> Result < String , Box < dyn std:: error:: Error > > {
162162 let mut output = Vec :: new ( ) ;
163163 let mut encoder = Encoder :: new_image ( & mut output, image. size , format, false ) ?;
164- encoder. encoding . quality = CompressionQuality :: High ;
165- encoder. encoding . dithering = Dithering :: ColorAndAlpha ;
164+ encoder. options . quality = CompressionQuality :: High ;
165+ encoder. options . dithering = Dithering :: ColorAndAlpha ;
166166 encoder. write_surface ( image. view ( ) ) ?;
167167 encoder. finish ( ) ?;
168168
0 commit comments