Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for smart object layers #134

Merged
merged 129 commits into from
Feb 25, 2025

Conversation

EmilDohne
Copy link
Owner

@EmilDohne EmilDohne commented Feb 23, 2025

New Features:

  • Add support for SmartObject layers SmartObjectLayer<T>, psapi.SmartObjectLayer_*bit
  • add support for SmartObject warps (Exceptions being "smart" perspective warp and puppet warp)

Python

  • Expose all mask parameters that were previously hidden. This includes mask_disabled, mask_relative_to_layer, mask_default_color, mask_density, mask_feather, mask_position, mask_width and mask_height

Bugfixes

  • Masks on layers now are better supported and have their width and height decoupled from the layers' width and height (except for during construction of image layers).
  • Internal: Harden file section write to be less error prone using scoped section markers

C++

  • Harden template requirements to only allow uint8_t, uint16_t, float for all Photoshop related templates

Python

  • Add missing is_visible and is_locked arguments to constructor of layers

Breaking Changes:

  • Layer coordinates are no longer expressed relative to the canvas center but rather relative to canvas top left to be more in line with photoshop
    • Example: if previously for a 64x64 canvas a centered layer was at (0, 0), now it would be at (32, 32)
  • Layer opacity is now expressed as a float (but still backed by a uint8_t

C++

  • Drop C++17 support
  • Public facing API was changed from camelCase to snake_case to be more in line and equal to python bindings
  • All previously public member variables are now private with appropriate getters and setters to allow the API to implement more logic on them in the future

Python

  • All image data is no longer expressed as a property but instead as method as these are potentially quite expensive to compute
  • ImageLayer_*bit.channels property is now ImageLayer_*bit.channel_indices()

Miscellaneous

  • Add Compositing Framework to prepare for eventual layer stack compositing
  • Internal: Add basic 2D rendering framework
  • Internal: Add Geometry Framework to allow for parsing of Quad Meshes and Bezier Surfaces
  • Internal: Add Parsing of Descriptors
  • Internal: Simplify endian functions to work more generically
  • Refactor large parts of the internal API.
  • Refactor inheritance structure of Image Based layers and extract mask logic to mixin

Dependencies

  • Add OpenImageIO as dependency (via vcpkg)
  • Add fmt as dependency (via vcpkg)
  • Add stduiid as dependency (via vcpkg)
  • Add eigen3 as dependency (via vcpkg)
  • Add json as a submodule
  • Move libdeflate from submodule to vcpkg
  • Add vcpkg submodule
  • Bump c-blosc2 to 2.15.2

Documentation

  • Link in examples directly to hosted docs for easier access

CI:

  • Add Clang ubuntu build target
  • Add ASAN to all tests (that support it)
  • Add Clang ubuntu valgrind target

@EmilDohne EmilDohne self-assigned this Feb 23, 2025
@EmilDohne EmilDohne linked an issue Feb 23, 2025 that may be closed by this pull request
EmilDohne and others added 28 commits February 23, 2025 13:51
…functions for proper access patterns but parsing is in place
…ith a zero length versus their actual bytelength
…a more cpp stdlib style setter and getter methodology
@EmilDohne EmilDohne force-pushed the 57-add-support-for-adjustment-layers branch from 3c5dda7 to 7319fca Compare February 23, 2025 14:29
@EmilDohne
Copy link
Owner Author

CI failures seem to be due to stale caches, kicking it off manually seems to fix

@EmilDohne EmilDohne merged commit ebd0c23 into master Feb 25, 2025
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for Adjustment Layers
1 participant