소스 검색

Small refactoring in tns_load()

master
Bert 14 년 전
부모
커밋
9fcf2c8f34
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. +7
    -4
      thumbs.c

+ 7
- 4
thumbs.c 파일 보기

@@ -82,11 +82,14 @@ void tns_load(tns_t *tns, win_t *win, int n, const char *filename) {

w = imlib_image_get_width();
h = imlib_image_get_height();
zw = (float) THUMB_SIZE / (float) w;
zh = (float) THUMB_SIZE / (float) h;
z = MIN(zw, zh);
if (!im && z > 1.0)

if (im) {
zw = (float) THUMB_SIZE / (float) w;
zh = (float) THUMB_SIZE / (float) h;
z = MIN(zw, zh);
} else {
z = 1.0;
}

t->w = z * w;
t->h = z * h;


불러오는 중...
취소
저장