Remove more QUALITY related code
This commit is contained in:
@@ -1,27 +1,10 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from converter.conf.settings import DEFAULT_OPTIONS
|
||||
from converter.conf.settings import LOW_QUALITY_OPTIONS
|
||||
from converter.conf.settings import HIGH_QUALITY_OPTIONS
|
||||
from converter.conf.settings import PRINT_QUALITY_OPTIONS
|
||||
|
||||
DEFAULT_ZOOM_LEVEL = 100
|
||||
DEFAULT_ROTATION = 0
|
||||
DEFAULT_PAGE_NUMBER = 1
|
||||
DEFAULT_FILE_FORMAT = u'jpeg'
|
||||
|
||||
QUALITY_DEFAULT = u'quality_default'
|
||||
QUALITY_LOW = u'quality_low'
|
||||
QUALITY_HIGH = u'quality_high'
|
||||
QUALITY_PRINT = u'quality_print'
|
||||
|
||||
QUALITY_SETTINGS = {
|
||||
QUALITY_DEFAULT: DEFAULT_OPTIONS,
|
||||
QUALITY_LOW: LOW_QUALITY_OPTIONS,
|
||||
QUALITY_HIGH: HIGH_QUALITY_OPTIONS,
|
||||
QUALITY_PRINT: PRINT_QUALITY_OPTIONS
|
||||
}
|
||||
|
||||
DIMENSION_SEPARATOR = u'x'
|
||||
|
||||
TRANSFORMATION_RESIZE = u'resize'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from django.template import Library, Node, Variable
|
||||
|
||||
from converter.api import get_document_dimensions, QUALITY_PRINT
|
||||
from converter.api import get_document_dimensions
|
||||
|
||||
from documents.views import calculate_converter_arguments
|
||||
from documents.conf.settings import PRINT_SIZE
|
||||
@@ -14,8 +14,7 @@ class GetImageSizeNode(Node):
|
||||
|
||||
def render(self, context):
|
||||
document = Variable(self.document).resolve(context)
|
||||
arguments, warnings = calculate_converter_arguments(document, size=PRINT_SIZE, quality=QUALITY_PRINT)
|
||||
width, height = get_document_dimensions(document, **arguments)
|
||||
width, height = get_document_dimensions(document)
|
||||
context[u'document_width'], context['document_height'] = width, height
|
||||
context[u'document_aspect'] = float(width) / float(height)
|
||||
return u''
|
||||
|
||||
Reference in New Issue
Block a user