adobe-photoshop / generator-assets

Generator Plug-in for Adobe Photoshop CC that helps users export image assets
MIT License
495 stars 87 forks source link

Scaling problem with rotated smart objects #322

Open Simon-Colley opened 9 years ago

Simon-Colley commented 9 years ago

Create a smart object from several shapes

screen shot 2014-11-03 at 16 17 50

Use the smart object flipped vertically in another psd as part of an icon.

screen shot 2014-11-03 at 16 16 49

Use generator to generate 50% 100% and 150% images (layer mask used to define bounds) Inspection of generated images shows incorrect scaling / stroke weight

summary-subsequent-multi summary-subsequent-multi 2x summary-subsequent-multi 3x

n.b.

Simon-Colley commented 9 years ago

Okay some more info:

The scaling issue seems to be with stroke width on the rotated smart object. It appears as if the stroke width is not scaled when the images are generated from the rotated smart object. The stroke is correctly scaled on the non-rotated smart object.

For example using 2px centre aligned stroked L shaped smart object rotated and non-rotated :

screen shot 2014-11-04 at 10 06 54

Produces correctly scaled strokes for the non rotated: screen shot 2014-11-04 at 10 13 40 screen shot 2014-11-04 at 10 05 18 screen shot 2014-11-04 at 10 05 34

And incorrectly scaled strokes for rotated (flipped vertically): screen shot 2014-11-04 at 10 05 46 screen shot 2014-11-04 at 10 06 01 screen shot 2014-11-04 at 10 06 10

BTW Happy to provide test file if needed.

joelrbrandt commented 9 years ago

Thanks for the detailed bug report, @Simon-Colley ! Hopefully we'll have the engineering resources available soon to look deeply into masks, bounds, and scaling.

kaptankorkut commented 9 years ago

+1

imaderyc commented 8 years ago

with scaling, I think it's similar with internal bug 3909740

chadrolfs commented 8 years ago

Was able to repro. @mcilroyc @pineapplespatula see testfile https://www.dropbox.com/s/f9mz7a181tiqzfv/iconSO-test-flipped.psd?dl=0

pineapplespatula commented 8 years ago

Photoshop checks for affine transformations to determine if it is safe to modify strokes may be failing in this case.