@@ -350,11 +350,11 @@ def save_dcraw_bad_pixels(path, bad_pixels):
350350    paths  =  [os .path .join (prefix , f ) for  f  in  testfiles ]
351351    coords  =  find_bad_pixels (paths )
352352
353-     import  imageio 
353+     import  imageio . v3   as   iio 
354354    raw  =  rawpy .imread (paths [0 ])
355355    if  not  os .path .exists ('test_original.png' ):
356356        rgb  =  raw .postprocess ()
357-         imageio . imsave ('test_original.png' , rgb )
357+         iio . imwrite ('test_original.png' , rgb )
358358
359359    # A. use dcraw repair 
360360    # Note that this method fails when two bad pixels are direct neighbors. 
@@ -365,7 +365,7 @@ def save_dcraw_bad_pixels(path, bad_pixels):
365365    save_dcraw_bad_pixels (bad_pixels_path , coords )
366366    rgb  =  raw .postprocess (bad_pixels_path = bad_pixels_path )
367367    print ('badpixel dcraw repair+postprocessing:' , time .time ()- t0 , 's' )
368-     imageio . imsave ('test_hotpixels_repaired_dcraw.png' , rgb )
368+     iio . imwrite ('test_hotpixels_repaired_dcraw.png' , rgb )
369369
370370    # B. use own repair function 
371371    # With method='median' we still consider each bad pixel separately 
@@ -374,7 +374,7 @@ def save_dcraw_bad_pixels(path, bad_pixels):
374374    repair_bad_pixels (raw , coords , method = 'median' )
375375    rgb  =  raw .postprocess ()
376376    print ('badpixel repair+postprocessing:' , time .time ()- t0 , 's' )
377-     imageio . imsave ('test_hotpixels_repaired.png' , rgb )
377+     iio . imwrite ('test_hotpixels_repaired.png' , rgb )
378378
379379    # TODO method 'mean' not implemented yet 
380380
0 commit comments