@@ -59,7 +59,7 @@ def write_file(filename: str, data: torch.Tensor) -> None:
59
59
60
60
def decode_png (input : torch .Tensor , mode : ImageReadMode = ImageReadMode .UNCHANGED ) -> torch .Tensor :
61
61
"""
62
- Decodes a PNG image into a 3 dimensional RGB or grayscale Tensor.
62
+ Decodes a PNG image into a 3 dimensional RGB or grayscale contiguous Tensor.
63
63
Optionally converts the image to the desired format.
64
64
The values of the output tensor are uint8 in [0, 255].
65
65
@@ -117,7 +117,7 @@ def decode_jpeg(
117
117
input : torch .Tensor , mode : ImageReadMode = ImageReadMode .UNCHANGED , device : str = "cpu"
118
118
) -> torch .Tensor :
119
119
"""
120
- Decodes a JPEG image into a 3 dimensional RGB or grayscale Tensor.
120
+ Decodes a JPEG image into a 3 dimensional RGB or grayscale contiguous Tensor.
121
121
Optionally converts the image to the desired format.
122
122
The values of the output tensor are uint8 between 0 and 255.
123
123
@@ -185,7 +185,7 @@ def write_jpeg(input: torch.Tensor, filename: str, quality: int = 75):
185
185
def decode_image (input : torch .Tensor , mode : ImageReadMode = ImageReadMode .UNCHANGED ) -> torch .Tensor :
186
186
"""
187
187
Detects whether an image is a JPEG or PNG and performs the appropriate
188
- operation to decode the image into a 3 dimensional RGB or grayscale Tensor.
188
+ operation to decode the image into a 3 dimensional RGB or grayscale contiguous Tensor.
189
189
190
190
Optionally converts the image to the desired format.
191
191
The values of the output tensor are uint8 in [0, 255].
@@ -207,7 +207,7 @@ def decode_image(input: torch.Tensor, mode: ImageReadMode = ImageReadMode.UNCHAN
207
207
208
208
def read_image (path : str , mode : ImageReadMode = ImageReadMode .UNCHANGED ) -> torch .Tensor :
209
209
"""
210
- Reads a JPEG or PNG image into a 3 dimensional RGB or grayscale Tensor.
210
+ Reads a JPEG or PNG image into a 3 dimensional RGB or grayscale contiguous Tensor.
211
211
Optionally converts the image to the desired format.
212
212
The values of the output tensor are uint8 in [0, 255].
213
213
0 commit comments