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

Layers outside of the bounding rect of the PSD #43

Open
bram-dingelstad opened this issue Apr 13, 2023 · 2 comments
Open

Layers outside of the bounding rect of the PSD #43

bram-dingelstad opened this issue Apr 13, 2023 · 2 comments

Comments

@bram-dingelstad
Copy link

bram-dingelstad commented Apr 13, 2023

I am trying to render PSD layers to seperate PNG files for a game.
Our artists sometimes give us PSDs with layers that are slightly outside of the bounding box, as to make the final composition work. However, I would assume I can still extract the full image information.

This issue is likely related to or a duplicate of #26

Let me know if the general fix for this is similar as you outlined in #26 @chinedufn & i'll get to it!

When exporting the layers I get the following error:

thread 'main' panicked at 'attempt to multiply with overflow', /Users/bram/Development/psd/src/sections/layer_and_mask_information_section/layer.rs:438:9

or

thread 'main' panicked at 'index out of bounds: the len is 40212480 but the index is 40213160', /Users/bram/Development/psd/src/psd_channel.rs:171:21

@namse
Copy link
Contributor

namse commented May 18, 2023

I face same issue, this library change i32 to usize without any protection.

let top_in_psd = idx / self.width() as usize + self.layer_properties.layer_top as usize;

image

@chinedufn
Copy link
Owner

This issue is likely related to or a duplicate of #26

@bram-dingelstad not sure if you found a different solution, but if not I'd be happy to review a fix to #26 . From what I'm understanding it sounds related to your issue.

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

No branches or pull requests

3 participants