Falk Joensson's
Eas (Easy Application Script)

Rendering 2D Drawings:22. Trim or Extend a Drawing

DRAW'TRIM! reduces the image to the rectangle where the current layer is either not totally transparent or, if it has no transparency on its outer edges, to where it is not the average edge color DRAW'TRIM:l 0 uses the limit 0≤l≤255 (255=no trim) to reduce the image to the rectangle where the current layer either has a higher opacity than l (alpha limit) or, if it has no transparency on its outer edges, to where its red, green and/or blue channel are at least l/2 away from those of the average edge color (color channels limit) DRAW'EXTEND:w 1 m "a" enlarges the drawing by 0≤w≤300 (width) pixels the new margin space (in the current layer) is either - if m=0: left blank (fully transparent) - filled with the color m given as either a string of the CSS'COLA formats #X #XA #RGB #RGBA #RRGGBB #RRGGBBAA or a CSS color mixer string of the formats rgb(RRR,GGG,BBB) rgba(RRR,GGG,BBB,AAA) which can be generated with CSS'COLA - if m="a": automatically either left blank or filled with the average color of all outer edges of the current layer - if m="n": created from enlarging the image which can be modified by n([+-]\d+)?(:\d+)? with [+-]\d+ as -100≤brightness≤100 and :\d+ as 0≤opacity≤100 %
 
22. Trim or Extend a Drawing
D Download Eas 4B
O Donate
C Contact
Esc Search / Table of Contents