Release 0.2.1

### Fixed

- Fixed broken transparency on palettized PNG files

### Changed

- Changed which wheels are built by the CI. There are no changes to OS or Python version compatibility if you compile from source.
	- Stopped building Python 3.7 wheels
	- Stopped building macOS universal wheels
	- Wheels for macOS now require macOS 12 or later
	- Included macOS ARM wheels 
	- Included Python 3.12 wheels
This commit is contained in:
Andrew Cassidy 2024-06-02 18:58:48 -07:00
parent 1f7aad7218
commit a05c1e352e
2 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,22 @@
All notable changes to this project will be documented in this file
## 0.2.1 - 2024-06-03
### Fixed
- Fixed broken transparency on palettized PNG files
### Changed
- Changed which wheels are built by the CI. There are no changes to OS or Python version compatibility if you compile from source.
- Stopped building Python 3.7 wheels
- Stopped building macOS universal wheels
- Wheels for macOS now require macOS 12 or later
- Included macOS ARM wheels
- Included Python 3.12 wheels
## 0.2.0 - 2023-06-21
### Changed

View File

@ -275,6 +275,7 @@ def read(path: os.PathLike) -> DDSFile:
def encode(image: Image.Image, encoder, four_cc: str, mip_count: typing.Optional[int] = None) -> DDSFile:
if image.mode != 'RGBA' or image.mode != 'RGBX':
mode = 'RGBA' if 'A' in image.mode else 'RGBX'
image.apply_transparency() # why is this necessary what
image = image.convert(mode)
sizes = quicktex.image_utils.mip_sizes(image.size, mip_count)