13
13
import numpy as np
14
14
15
15
if typing .TYPE_CHECKING :
16
- from pathlib import Path
17
16
from colour .hints import (
18
17
Any ,
19
18
ArrayLike ,
20
19
DTypeReal ,
21
20
Literal ,
22
21
NDArrayFloat ,
22
+ PathLike ,
23
23
Sequence ,
24
24
Tuple ,
25
25
Type ,
@@ -332,7 +332,7 @@ def convert_bit_depth(
332
332
@typing .overload
333
333
@required ("OpenImageIO" )
334
334
def read_image_OpenImageIO (
335
- path : str | Path ,
335
+ path : str | PathLike ,
336
336
bit_depth : Literal [
337
337
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
338
338
] = ...,
@@ -344,7 +344,7 @@ def read_image_OpenImageIO(
344
344
@typing .overload
345
345
@required ("OpenImageIO" )
346
346
def read_image_OpenImageIO (
347
- path : str | Path ,
347
+ path : str | PathLike ,
348
348
bit_depth : Literal [
349
349
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
350
350
] = ...,
@@ -357,7 +357,7 @@ def read_image_OpenImageIO(
357
357
@typing .overload
358
358
@required ("OpenImageIO" )
359
359
def read_image_OpenImageIO (
360
- path : str | Path ,
360
+ path : str | PathLike ,
361
361
bit_depth : Literal ["uint8" , "uint16" , "float16" , "float32" , "float64" , "float128" ],
362
362
additional_data : Literal [False ],
363
363
** kwargs : Any ,
@@ -366,7 +366,7 @@ def read_image_OpenImageIO(
366
366
367
367
@required ("OpenImageIO" )
368
368
def read_image_OpenImageIO (
369
- path : str | Path ,
369
+ path : str | PathLike ,
370
370
bit_depth : Literal [
371
371
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
372
372
] = "float32" ,
@@ -455,7 +455,7 @@ def read_image_OpenImageIO(
455
455
456
456
457
457
def read_image_Imageio (
458
- path : str | Path ,
458
+ path : str | PathLike ,
459
459
bit_depth : Literal [
460
460
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
461
461
] = "float32" ,
@@ -526,7 +526,7 @@ def read_image_Imageio(
526
526
527
527
528
528
def read_image (
529
- path : str | Path ,
529
+ path : str | PathLike ,
530
530
bit_depth : Literal [
531
531
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
532
532
] = "float32" ,
@@ -606,7 +606,7 @@ def read_image(
606
606
@required ("OpenImageIO" )
607
607
def write_image_OpenImageIO (
608
608
image : ArrayLike ,
609
- path : str | Path ,
609
+ path : str | PathLike ,
610
610
bit_depth : Literal [
611
611
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
612
612
] = "float32" ,
@@ -731,7 +731,7 @@ def write_image_OpenImageIO(
731
731
732
732
def write_image_Imageio (
733
733
image : ArrayLike ,
734
- path : str | Path ,
734
+ path : str | PathLike ,
735
735
bit_depth : Literal [
736
736
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
737
737
] = "float32" ,
@@ -824,7 +824,7 @@ def write_image_Imageio(
824
824
825
825
def write_image (
826
826
image : ArrayLike ,
827
- path : str | Path ,
827
+ path : str | PathLike ,
828
828
bit_depth : Literal [
829
829
"uint8" , "uint16" , "float16" , "float32" , "float64" , "float128"
830
830
] = "float32" ,
0 commit comments