Skip to content

Commit

Permalink
Updated Manifest to set the correct image color quality
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatsson committed Sep 21, 2022
1 parent a1a8426 commit a2960e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scan_explorer_service/manifest_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scan_explorer_service/views/image_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, '')
Expand Down

0 comments on commit a2960e7

Please sign in to comment.