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

feature: Implement additional ImageResources #55

Merged
merged 4 commits into from
Oct 19, 2022

Conversation

scoiatael
Copy link
Collaborator

Hey,

Over the past month we implemented some features in our fork for the upcoming OpenDesign new release. We didn't have time to discuss them with you properly, so let me know if you want these features or not - in case you do, I'll properly refactor the code and add tests :)

This is PR 2/3; implementing additional image resources: resolution info, global light properties.

@scoiatael scoiatael marked this pull request as ready for review October 18, 2022 11:17
@scoiatael
Copy link
Collaborator Author

Ready for review :)

Comment on lines +269 to +278
/**
* Reads unsigned 4-byte fixed-point number.
* 32 bits in 16.16 setup
* https://github.com/meltingice/psd.js/blob/333dd1467452a3353018c2856e3e4fb0e07d0025/lib/psd/resources/resolution_info.coffee#L10
*/
readFixedPoint32bit(): number {
const int = this.read("u32");
return int / (1 << 16);
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of ways Adobe came up with to store numbers never ceases to surprise me. Good work👏

@scoiatael scoiatael merged commit 1d1e702 into webtoon:main Oct 19, 2022
@scoiatael scoiatael deleted the feature/image-resources branch October 19, 2022 11:39
alexspevak pushed a commit to opendesigndev/psd-ts that referenced this pull request Jan 16, 2023
* [feature] Implement missing ImageResources

* Add tests for extra properties

* Simplify readFixedPoint32Bit computation

* Make DimensionUnit, ResolutionUnit part of API
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.

2 participants