question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't force OpenSeaDragon to ask png format from IIIF tileSource

See original GitHub issue

Hi,

OpenSeaDragon is always asking for jpg files to the iiif server, even if the tileSource format is png only: GET https://myserver/loris/myfile.png/full/286,/0/default.jpg

I noticed this issue for some of my files that are pngs for which asking default.jpg is returning a 500 error page: Server Side Error: cannot write mode RGBA as JPEG

My JS:

var tileSource = 
{
  "profile": [
    {
      "supports": [
        "canonicalLinkHeader",
        "profileLinkHeader",
        "mirroring",
        "rotationArbitrary",
        "regionSquare",
        "sizeAboveFull"
      ],
      "qualities": [
        "default",
        "color",
        "gray",
        "bitonal"
      ],
      "formats": [
        "png"
      ]
    }
  ],
  "protocol": "http://iiif.io/api/image",
  "sizes": [],
  "height": 3230,
  "width": 2281,
  "@context": "http://iiif.io/api/image/2/context.json",
  "@id": "https://myserver/loris/myfile.png"
};
var jsonOpenSeaDragon = {
    ...
    tileSources: [ tileSource ],
    ...
};
OpenSeadragon(jsonOpenSeaDragon);

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
iangilmancommented, Mar 19, 2019

Fixed by #1625. See discussion there for strategies.

1reaction
azaroth42commented, Nov 16, 2017

The issue is correct, the tilesource is hard coded to request .jpgs, as every server is required to support them … but of course they don’t have an alpha channel. The initialization could be extended to have a format and/or quality override to request something other than default.jpg

Read more comments on GitHub >

github_iconTop Results From Across the Web

IIIF Tile Source - OpenSeadragon
The IIIF API specifies a web service that returns an image in response to a standard HTTP or HTTPS request. The URL can...
Read more >
openseadragon/openseadragon - Gitter
We're using OSD with a single JPG image as a tile source. In some cases (eg when viewing on a large display), the...
Read more >
openseadragon.js | searchcode
wrapHorizontal=false] 165 * Set to true to force the image to wrap horizontally within the viewport. 166 * Useful for maps or images...
Read more >
openseadragon.min.js.map
n *\n * @property {Boolean} [wrapVertical=false]\n * Set to true to force the image to wrap vertically within the viewport.\n * Useful for...
Read more >
Pawtucket2 Image Overlay Issues - CollectiveAccess
I have tried reprocessing media, updating the IIIFController.php file in Pawtucket, changing the viewer to TileViewer, UniversalViewer, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found