# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
import json
import time
from io import BytesIO
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
import json
import time
from io import BytesIO
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
- (THUMB_WIDTH - simg.size[0]) / 2,
- i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2,
+ round((THUMB_WIDTH - simg.size[0]) / 2),
+ round(i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2),