v0.5.0
The v0.5.0
Release primarily targets adding support for CMYK and Grayscale while also improving the overal consistency of the python bindings. Additionally we added support for trivially replacing image data.
Three new examples were added. Please feel free to check them out!
- Using Progress callbacks (C++ only for now)
- Replacing image data on a layer
- Rescaling a whole file using OpenCV
Roadmap
v0.6.0
- Adjustment Layers
- Smart Objects
Performance
- Read and Write speeds of 8-bit files are about 30-40% faster
- Read and Write speeds of 16- and 32-bit files are about 10-15% faster
- Image data extraction from
ImageLayer<T>
now runs fully parallelized - Python channel extraction speed was greatly improved
Features:
C++ / General
- Add optional
ProgressCallback
that can be passed to read and write functions forLayeredFile<T>
- Add support for Unicode layer names. Preferring these over PascalString layer names.
- Add support for CMYK color mode
- Add support for Grayscale color mode
- Make files Krita compatible
- Add support for locked layers
- Add a
PhotoshopFile::findBitdepth()
function which reads out the header and allows for programmatic dispatching ofLayeredFile<T>
instances - Add a
LayeredFile<T>::flatLayers()
function for getting a flattened layer hierarchy which can be iterated without recursion. - Add functions for swapping image data:
ImageLayer<T>::setImageData()
,Layer<T>::setMask()
Python
- Added more verbose error logging if the image data provided as numpy array does not match what is expected
- LayeredFile: add
flat_layers
property giving you a temporary view over all the layers allowing for easy flat traversal. This is especially useful when applying some operation to all layers like resizing. - Layer: add
is_visible
property - Layer: add
is_locked
property - Layer: add
has_mask()
function - ImageLayer: add
set_image_data
,set_channel_by_id
andset_channel_by_index
functions as well as making theimage_data
property read-writable - ImageLayer: add
num_channels
andchannels
properties
Bugfixes:
C++ / General
findLayerAs()
function no longer raises an error if layer cannot be found but instead returnsnullptr
to be more consistent withLayeredFile<T>::findLayer()
- Fix memory leak due to missing call to
blosc2_schunk_free()
- Fix bug where files with only GroupLayers would not be openable in photoshop
- Mask channels passed to
ImageLayer<T>
as image data now get automatically forwarded tom_LayerMask
Python
- Fixed bug where non c-style contiguous arrays wouldn't be parsed correctly (e.g. when using
numpy.reshape()
). This conversion is now forced in-place - Fix missing
self
argument in psapi-stubs
Deprecations
- Deprecate
Layer<T>::getMaskData()
in favour ofLayer<T>::getMask()
Breaking changes:
The main breaking changes are to what is considered the internal API. A lot of the files in Util/
were moved over to Core/
where appropriate.
ImageLayer<T>
constructor now takes an int16_t
rather than uint16_t
Python
- The
Layer.layer_mask
property has been removed in favour ofLayer.mask
. This property is now read-writable
CI / Compiling
- Cranked up warnings under MSVC to /W4 and /WX with some additional warnings
- Added ASAN and Valgrind steps to CI for continuous checking of correctness
- Added memory-mapped files as backend for faster load times