ActiveDocument.resizeImage doesn't resize layer effects
I noticed something when I made a script for batch-exporting a large number of icons:
When I scale things manually (Image > Image Size), the layer effects of my artLayers scale accordingly to the document size.
When I scale things in code, the layer effects are NOT scaled accordingly to the document size. So if I scale something down then the layer effect will appear to be twice as thick/strong as before - why?
You can try it yourself:
Create a doc, with a new layer, paint something like a square and apply a stroke layer effect to it of something like 8px.
Run the below code:
var doc = activeDocument
doc.resizeImage(UnitValue(50, "percent"), UnitValue(50, "percent"), 72, ResampleMethod.BILINEAR);
The layer will still have a 8px thick stroke effect. But if you scale it manually the effect will scale along with the document.
How can I repeat that behavior in code?
