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

Clipped asset when there's a larger-than-canvas layer whose bounds depend on opacity #404

Open
mcilroyc opened this issue Apr 22, 2016 · 4 comments

Comments

@mcilroyc
Copy link
Contributor

This bug was originally reported in watson # 4136380 via pre-release user.

See attached test file.
transparent-texture-clipping.zip

Note the "texture" layer is larger than the canvas. If it is >50% opacity, the entire layer will be included in the PS thumbnail pixmap and the resultant exported asset is correct. But at <50% Opacity, the PS thumbnail will have slightly smaller bounds (because it clips to visible pixels, and the some outermost pixels fall of the end of the clif at some opacity level).

The problem does not exist if we are using "exact bounds", but in the commonly-used "approximate bounds" approach, it results in the odd clipping behavior. There is a poorly handled mismatch between the full "expected" bounds vs. the slightly-reduced pixmap bounds actually returned by PS. The result is a file less than the 800x800 document size.

@chadrolfs
Copy link

@pineapplespatula, are you about to check in a fix for this?

@pineapplespatula
Copy link
Contributor

this may be addressed by PR #406

@mcilroyc
Copy link
Contributor Author

I think this is not addressed by 406.
One fix for this issue (which I've tested) is to force "exact bounds" for all top-level or document exports.

like:

        if ((!layer && !layerComp) ||
            isInvisible ||
            hasComplexTransform ||
  ....

@chadrolfs
Copy link

Here is another case where exported dimensions are not correct due to layer extending beyond canvas bounds:
sjshare/Photoshop/Bugfiles/git/generator-assets/404/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants