File tree 1 file changed +7
-2
lines changed 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,7 @@ vips_sharpen_build(VipsObject *object)
199
199
in = t [0 ];
200
200
201
201
if (vips_check_uncoded (class -> nickname , in ) ||
202
- vips_check_bands_atleast (class -> nickname , in , 3 ) ||
203
- vips_check_format (class -> nickname , in , VIPS_FORMAT_SHORT ))
202
+ vips_check_bands_atleast (class -> nickname , in , 3 ))
204
203
return -1 ;
205
204
206
205
/* Stop at 10% of max ... a bit mean. We always sharpen a short,
@@ -217,6 +216,12 @@ vips_sharpen_build(VipsObject *object)
217
216
vips_matrixprint (t [1 ], NULL );
218
217
#endif /*DEBUG*/
219
218
219
+ /* Make sure we're short (need this for the LUT) and not eg. float LABS.
220
+ */
221
+ if (vips_cast_short (in , & t [2 ], NULL ))
222
+ return -1 ;
223
+ in = t [2 ];
224
+
220
225
/* Index with the signed difference between two 0 - 32767 images.
221
226
*/
222
227
if (!(sharpen -> lut = VIPS_ARRAY (object , 65536 , int )))
You can’t perform that action at this time.
0 commit comments