diff --git a/scan_explorer_service/manifest_factory.py b/scan_explorer_service/manifest_factory.py index 3c2c8f3..82ffb77 100644 --- a/scan_explorer_service/manifest_factory.py +++ b/scan_explorer_service/manifest_factory.py @@ -68,7 +68,8 @@ def create_image_annotation(self, page: Page): image: Image = annotation.image( ident=page.image_path, label=f'p. {page.label}', iiif=True) - image.id = image.id.replace(f'/{page.image_color_quality}.jpg', f'/{page.image_color_quality}.tif') + # Override default image quality and format set by prezi + image.id = image.id.replace(f'/default.jpg', f'/{page.image_color_quality}.tif') image.format = page.format image.height = page.height diff --git a/scan_explorer_service/views/image_proxy.py b/scan_explorer_service/views/image_proxy.py index ddca3fb..b2e05b0 100644 --- a/scan_explorer_service/views/image_proxy.py +++ b/scan_explorer_service/views/image_proxy.py @@ -99,7 +99,7 @@ def loop_images(id, page_start, page_end): size = 'full' if dpi != 600: size = str(int(page.width*scaling))+ "," - image_url = page.image_url + "/full/" + size + f"/0/{page.image_color_quality}.png" + image_url = page.image_url + "/full/" + size + f"/0/{page.image_color_quality}.tif" path = urlparse.urlparse(image_url).path remove = urlparse.urlparse(url_for_proxy('proxy.image_proxy', path='')).path path = path.replace(remove, '')