Posted by Duritz
가운데 검은 점을 계속 주시..
칼라 사진으로 보임.. 하지만...
다시 보면 흑백.. ㅋㅋ

'My Life > Fun' 카테고리의 다른 글

조용필 빤스 사건  (0) 2013.05.24
흔한 예비군 1년차  (0) 2013.05.24
남자들의 흔한착각 ;;;  (0) 2013.05.24
한국에서 유명한 RtA라면  (0) 2013.05.24
대학교 기숙사 외박사유  (0) 2013.05.24
Posted by Duritz

public class ImageThumbnail
{
 private Image createThumbnail(Image image, int _thumbWidth, int _thumbHeight) {
  int sourceWidth = image.getWidth();
  int sourceHeight = image.getHeight();

  int thumbWidth = _thumbWidth;
  int thumbHeight = _thumbHeight;

  Image thumb = Image.createImage(thumbWidth, thumbHeight);
  Graphics g = thumb.getGraphics();

  for (int y = 0; y < thumbHeight; y++) {
   for (int x = 0; x < thumbWidth; x++) {
    g.setClip(x, y, 1, 1);
    int dx = x * sourceWidth / thumbWidth;
    int dy = y * sourceHeight / thumbHeight;
    g.drawImage(image, x - dx, y - dy,
    Graphics.LEFT | Graphics.TOP);
   }
  }

  Image immutableThumb = Image.createImage(thumb);

  return immutableThumb;
 }
}

Posted by Duritz

공지사항

Yesterday
Today
Total
08-16 03:34

달력

 « |  » 2025.8
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31