gallica manifest in mirador

27 views
Skip to first unread message

Pietro Liuzzo

unread,
Jul 26, 2017, 7:27:41 AM7/26/17
to iiif-d...@googlegroups.com
Dear all,

I would like to load this manifest in mirador


It loads nicely but then I see it only in the list and the viewer only offers the add item option agin.
in console mirador say Uncaught Unsupported image format for LegacyTileSource.
 
Could anyone advise me on what I am doing wrong?

Thanks a lot!
Pietro

--
Pietro Maria Liuzzo
cel (DE): +49 (0) 176 61 000 606
Skype: pietro.liuzzo (Quingentole)

Régis Robineau

unread,
Jul 26, 2017, 8:00:59 AM7/26/17
to iiif-d...@googlegroups.com, mirado...@googlegroups.com
Hi Pietro,

This is known bug in one of the Mirador dependency called "iiif-evented-canvas" (a node module introduced in Mirador 2.5). The bug occurs at this line: https://github.com/sul-dlss/iiif-evented-canvas/blob/master/src/thumbnailFactory.js#L39

I circumvented the bug by replacing the block of code that begins at line 39 by the following one:
var id = resource['@id'];
  if (id) {
    if (!id.toLowerCase().match(/^.*\.(png|jpg|jpeg|gif)$/)) {
      // it is still a service URL
      var format = getResourceFormat(resource.format);
      if (resource.service) {
        return resource.service['@id'] + buildResourceSize() + '0/' + getTileBasename() + '.' + format;
      } else {
        return id;
      }
    } else {
      // we still don't want the full size
      return id.replace("/full/full/", buildResourceSize());
    }
  }

I know it works because I am already using it in several Mirador instances at Biblissima, but I am still not sure it is an acceptable solution in terms of code because it has not been merged yet in the Github repo.

I guess you also need to merge on your own the latest change (that solves another bug) made by Matthias on the same "iiif-evented-canvas" library, see this commit: https://github.com/sul-dlss/iiif-evented-canvas/commit/45e18ff1971c97f840cf0cf81ac685912a0f4b53

Hope that helps.

Régis
--
-- You received this message because you are subscribed to the IIIF-Discuss Google group. To post to this group, send email to iiif-d...@googlegroups.com. To unsubscribe from this group, send email to iiif-discuss...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/iiif-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "IIIF Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iiif-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pietro Liuzzo

unread,
Jul 26, 2017, 9:01:57 AM7/26/17
to iiif-d...@googlegroups.com
Thanks a lot!

I have reinstalled mirador from here https://github.com/ProjectMirador/mirador
I have then run npm install and I modified the file you named which I found in the node_modules directory.
then I run grunt and I copied over the contents of the build directory into my project. 
I am not sure this is what I was supposed to do, but unfortunately it did not work.

perhaps in this process I did something wrong or omitted some passages.

Thanks for any further hint!

Pietro





--
-- You received this message because you are subscribed to the IIIF-Discuss Google group. To post to this group, send email to iiif-d...@googlegroups.com. To unsubscribe from this group, send email to iiif-discuss+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/iiif-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "IIIF Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iiif-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
-- You received this message because you are subscribed to the IIIF-Discuss Google group. To post to this group, send email to iiif-d...@googlegroups.com. To unsubscribe from this group, send email to iiif-discuss+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/iiif-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "IIIF Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iiif-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Régis Robineau

unread,
Jul 26, 2017, 9:53:52 AM7/26/17
to iiif-d...@googlegroups.com, Pietro Liuzzo, mirado...@googlegroups.com
It may be because Mirador keeps using the packaged file " dist/iiif-evented-canvas.umd.min.js" (see https://github.com/ProjectMirador/mirador/blob/develop/Gruntfile.js#L50). And it seems that the build process of "iiif-evented-canvas" only outputs " dist/iiif-evented-canvas.js" (see https://github.com/sul-dlss/iiif-evented-canvas/blob/master/webpack.config.js#L7).

You could also directly modify the "iiif-evented-canvas.umd.min.js" file, that is not minified/uglified so you can edit it easily... this is what I did.

Régis
-- You received this message because you are subscribed to the IIIF-Discuss Google group. To post to this group, send email to iiif-d...@googlegroups.com. To unsubscribe from this group, send email to iiif-discuss...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/iiif-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "IIIF Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iiif-discuss...@googlegroups.com.

Simon Rainer

unread,
Jul 26, 2017, 9:55:30 AM7/26/17
to iiif-d...@googlegroups.com
Hi Pietro,

I looked at this briefly (in Recogito) and it seems to me Gallica responds to the actual image metadata request(s) with a server error.

E.g. this: http://gallica.bnf.fr/iiif/ark:/12148/btv1b525023971/canvas/f219/info.json

Not sure if this helps track down the issue (but at least I don't think the issue lies with Mirador).

Cheers,
Rainer


________________________________________
Von: iiif-d...@googlegroups.com [iiif-d...@googlegroups.com]" im Auftrag von "Pietro Liuzzo [pietro...@gmail.com]
Gesendet: Mittwoch, 26. Juli 2017 13:27
An: iiif-d...@googlegroups.com
Betreff: [IIIF-Discuss] gallica manifest in mirador
--
-- You received this message because you are subscribed to the IIIF-Discuss Google group. To post to this group, send email to iiif-d...@googlegroups.com. To unsubscribe from this group, send email to iiif-discuss...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/iiif-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "IIIF Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iiif-discuss...@googlegroups.com<mailto:iiif-discuss...@googlegroups.com>.

Régis Robineau

unread,
Jul 26, 2017, 10:06:14 AM7/26/17
to iiif-d...@googlegroups.com, Simon Rainer, mirado...@googlegroups.com
As a side note, this URL is not a valid info.json request for Gallica,
this is why it throws a server error or does not return valid json.

The good one is:
http://gallica.bnf.fr/iiif/ark:/12148/btv1b525023971/f219/info.json (but
Image API 1.1 :( )

I am quite sure this is a Mirador issue related to the
"iiif-evented-canvas" module, Drew Winget and some other Mirador folks
could confirm that...

Cheers,
Régis

Simon Rainer

unread,
Jul 26, 2017, 10:09:38 AM7/26/17
to Régis Robineau, iiif-d...@googlegroups.com, mirado...@googlegroups.com
Hi,

ah sorry - my bad. I just realized the mistake. (Also, I wrote my mail before your answer about the Mirador issue. Just took a while until it got approved to the mailing list. Sorry for the confusion in any case.)

Cheers,
R

________________________________________
Von: Régis Robineau [regis.r...@ephe.sorbonne.fr]
Gesendet: Mittwoch, 26. Juli 2017 16:06
An: iiif-d...@googlegroups.com
Cc: Simon Rainer; mirado...@googlegroups.com
Betreff: Re: AW: [IIIF-Discuss] gallica manifest in mirador

Pietro Liuzzo

unread,
Jul 26, 2017, 10:45:09 AM7/26/17
to Régis Robineau, iiif-d...@googlegroups.com, mirado...@googlegroups.com
Thanks again! 

I tried also to edit (with the same suggestion as above) this file in node_modules/iiif-evented-canvas/dist
then I run grunt again, but the problem persists. I am sure I am doing something in the wrong order...
Thanks again!
Pietro
Reply all
Reply to author
Forward
0 new messages