Skip to content

Commit 2c4be4f

Browse files
committed
rel 2023.0.2
1 parent aa8db05 commit 2c4be4f

17 files changed

+30
-29
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
All major and minor version changes will be documented in this file. Details of
44
patch-level version changes can be found in [commit messages](../../commits/master).
55

6-
## 2023.0.1 - 2023/12/01
6+
## 2023.0.2 - 2023/12/01
77

88
- add: Using os.path.splitext() to support Path objects https://github.com/FHPythonUtils/LayeredImage/pull/6, thank you https://github.com/denilsonsa!
99

documentation/reference/layeredimage/io/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Io
1515

1616
## exportFlatImage
1717

18-
[Show source in __init__.py:102](../../../../layeredimage/io/__init__.py#L102)
18+
[Show source in __init__.py:103](../../../../layeredimage/io/__init__.py#L103)
1919

2020
Export the layered image to a unilayer image file.
2121

@@ -43,7 +43,7 @@ def extNotRecognised(fileName: str): ...
4343

4444
## openLayerImage
4545

46-
[Show source in __init__.py:33](../../../../layeredimage/io/__init__.py#L33)
46+
[Show source in __init__.py:34](../../../../layeredimage/io/__init__.py#L34)
4747

4848
Open a layer image file into a layer image object.
4949

@@ -70,7 +70,7 @@ def openLayerImage(file: str | Path) -> LayeredImage: ...
7070

7171
## saveLayerImage
7272

73-
[Show source in __init__.py:69](../../../../layeredimage/io/__init__.py#L69)
73+
[Show source in __init__.py:70](../../../../layeredimage/io/__init__.py#L70)
7474

7575
Save a layered image to a file.
7676

layeredimage/io/__init__.py

+25-24
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def extNotRecognised(fileName: str):
2626
exts = ["ora", "psd", "xcf", "pdn", "tif", "tiff", "webp", "gif", "lsr", "layered", "layeredc"]
2727
print(
2828
f"ERROR: File extension is not recognised for file: {fileName}! Must be one of "
29-
', "'.join(exts) + '"'
29+
+ ', "'.join(exts)
30+
+ '"'
3031
)
3132

3233

@@ -44,17 +45,17 @@ def openLayerImage(file: str | Path) -> LayeredImage:
4445
LayeredImage: a layered image object
4546
"""
4647
functionMap = {
47-
"ora": openLayer_ORA,
48-
"psd": openLayer_PSD,
49-
"xcf": openLayer_XCF,
50-
"pdn": openLayer_PDN,
51-
"tif": openLayer_TIFF,
52-
"tiff": openLayer_TIFF,
53-
"webp": openLayer_WEBP,
54-
"gif": openLayer_GIF,
55-
"lsr": openLayer_LSR,
56-
"layered": openLayer_LAYERED,
57-
"layeredc": openLayer_LAYEREDC,
48+
".ora": openLayer_ORA,
49+
".psd": openLayer_PSD,
50+
".xcf": openLayer_XCF,
51+
".pdn": openLayer_PDN,
52+
".tif": openLayer_TIFF,
53+
".tiff": openLayer_TIFF,
54+
".webp": openLayer_WEBP,
55+
".gif": openLayer_GIF,
56+
".lsr": openLayer_LSR,
57+
".layered": openLayer_LAYERED,
58+
".layeredc": openLayer_LAYEREDC,
5859
}
5960
if not exists(file):
6061
print(f"ERROR: {file} does not exist")
@@ -80,19 +81,19 @@ def saveLayerImage(fileName: str | Path, layeredImage: LayeredImage) -> None:
8081
None
8182
"""
8283
functionMap = {
83-
"ora": saveLayer_ORA,
84-
"psd": saveLayer_PSD,
85-
"xcf": saveLayer_XCF,
86-
"pdn": saveLayer_PDN,
87-
"tif": saveLayer_TIFF,
88-
"tiff": saveLayer_TIFF,
89-
"webp": saveLayer_WEBP,
90-
"gif": saveLayer_GIF,
91-
"lsr": saveLayer_LSR,
92-
"layered": saveLayer_LAYERED,
93-
"layeredc": saveLayer_LAYEREDC,
84+
".ora": saveLayer_ORA,
85+
".psd": saveLayer_PSD,
86+
".xcf": saveLayer_XCF,
87+
".pdn": saveLayer_PDN,
88+
".tif": saveLayer_TIFF,
89+
".tiff": saveLayer_TIFF,
90+
".webp": saveLayer_WEBP,
91+
".gif": saveLayer_GIF,
92+
".lsr": saveLayer_LSR,
93+
".layered": saveLayer_LAYERED,
94+
".layeredc": saveLayer_LAYEREDC,
9495
}
95-
fileExt = splitext(file)[1].lower()
96+
fileExt = splitext(fileName)[1].lower()
9697
if fileExt not in functionMap:
9798
extNotRecognised(fileName)
9899
raise ValueError

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "layeredimage"
3-
version = "2023.0.1"
3+
version = "2023.0.2"
44
license = "mit"
55
description = "Use this module to read, and write to a number of layered image formats"
66
authors = ["FredHappyface"]

tests/data/gif_output.ora

0 Bytes
Binary file not shown.

tests/data/layered_output.ora

0 Bytes
Binary file not shown.

tests/data/layeredc_output.ora

0 Bytes
Binary file not shown.

tests/data/lsr_output.lsr

0 Bytes
Binary file not shown.

tests/data/lsr_output.ora

0 Bytes
Binary file not shown.

tests/data/ora_output.layered

0 Bytes
Binary file not shown.

tests/data/ora_output.layeredc

0 Bytes
Binary file not shown.

tests/data/ora_output.ora

0 Bytes
Binary file not shown.

tests/data/pdn_output.ora

0 Bytes
Binary file not shown.

tests/data/psd_output.ora

0 Bytes
Binary file not shown.

tests/data/tiff_output.ora

0 Bytes
Binary file not shown.

tests/data/webp_output.ora

0 Bytes
Binary file not shown.

tests/data/xcf_output.ora

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)