public static Image getThumbnail (Image src, int dstW, int dstH)
{
int srcW = src.getWidth();
int srcH = src.getHeight();
Image tmp = Image.createImage(dstW, srcH);
Graphics g = tmp.getGraphics();
int delta = (srcW << pos =" delta/2;" x =" 0;">> 16), 0, Graphics.LEFT |
Graphics.TOP );
pos += delta;
}
Image dst = Image.createImage(dstW, dstH);
g = dst.getGraphics();
delta = (srcH << pos =" delta/2;" y =" 0;">> 16), Graphics.LEFT |
Graphics.TOP );
pos += delta;
}
return dst;
}
{
int srcW = src.getWidth();
int srcH = src.getHeight();
Image tmp = Image.createImage(dstW, srcH);
Graphics g = tmp.getGraphics();
int delta = (srcW << pos =" delta/2;" x =" 0;">> 16), 0, Graphics.LEFT |
Graphics.TOP );
pos += delta;
}
Image dst = Image.createImage(dstW, dstH);
g = dst.getGraphics();
delta = (srcH << pos =" delta/2;" y =" 0;">> 16), Graphics.LEFT |
Graphics.TOP );
pos += delta;
}
return dst;
}
No comments:
Post a Comment