Crop with scripts failed,Help please.
Hi~,
when i use script command 'app.activeDocument.crop(layer.bounds)', error message popout:The command cannot be completed because the affected area is empty or does not overlap the canvas.
before this action, i have set all layers invisible, then:
layer.visible = true;
app.activeDocument.activeLayer = layer;
app.activeDocument.crop(layer.bounds);//this cause error
_saveImage(ffname);//export layer as png
layer.visible = false;
What should i do?
Thanks so much
