Lib_effects -       .

public static Image effect(Image img, int mode) -    

img -  ;
mode -    :
   0  -  ;
   1  -  ;
   2  -   -       20;
   3  -   -        20;
   4  -  ;
   5  -  ;
   6  -  ;
   7  -  -;


public static Image change (Image img, int ch, int val) -      val.

img -  ;
ch - :
   0  -  alpha;
   1  -  red;
   2  -  green;
   3  -  blue;
val -  (   )   .


public static int get (Image img, int x, int y, int ch) -        .

img -  ;
ch - :
   0  -  alpha;
   1  -  red;
   2  -  green;
   3  -  blue;
int x  int y -   .


public static Image saturation(Image img, int val) -  .

img -  ;
val -   0  255   ,    .


public static Image changecolor(Image img, int r1, int g1, int b1, int a2, int r2, int g2, int b2) -   r1g1b1  r2g2b2   a2

img -  ;
r1,g1,b1,r2,g2,b2 - 
a2 - 


public static Image band(Image img, int[] colors) -       .

img -  ;
colors -    0xffffffff -   .


public static Image fractaljulia(double creal, double cim, int sx, int sy, double startx, double starty, double width, double height) -   Julia

    c=creal+i*cim
sx, sy -      .
startx, starty -  
width, height -  
: Image img = fractaljulia(0.40,-0.11,200,200,-1.5,-1.5,2,2);


public static Image fractalmandelbrot(int sx, int sy, double startx, double starty, double width, double height) -  .    fractaljulia.


public static Image invert(Image img, boolean flipa, boolean flipr, boolean flipg, boolean flipb) -  .

img -  ;
flipa -  "true" -   ;
flipr -  "true" -  ;
flipg -  "true" -  ;
flipb -  "true" -  ;


public static Image threshold(Image img, int vdark, int vlight, int minlight) -           .

img -  ;
vdark -    (0xffffffff);
vlight -   (0xffffffff);
minlight -      (0..255);


public static int color(int alpha, int r, int g, int b) -    0xffffffff   (alpha, red, green, blue)

alpha, red, green, blue -      0  255


public static Image brightness(Image img, int difa, int difr, int difg, int difb) - .

img -  ;
da, dr, dg, db -      (-255..255);


public static Image contrast(Image img, double da, double dr,double dg,double db) - .

img -  ;
da, dr, dg, db -      (0..2);


public static Image gamma(Image img, double da, double dr, double dg, double db) - . 

img -  ;
da, dr, dg, db -      (0..2);
: gamma(0.8,1.5,1.2,1);


public static Image linear(Image img, double sr, double dr, double sg, double dg, double sb, double db, double sa, double da) -   .

   newgreen = oldgreen*sg+dg.     .


27.02.09
: aNNiMON