Project

General

Profile

task #9132

Update cyprus images to Scaler default API and add thumbnails

Added by Andreas Müller 29 days ago. Updated 16 days ago.

Status:
Resolved
Priority:
Highest
Category:
data
Target version:
Start date:
07/07/2020
Due date:
% Done:

40%

Severity:
normal

Description

Currently only 1 representation exists (for the full image) using the Scaler IIF API with links like:

https://pictures.bgbm.org/digilib/Scaler/IIIF/Cyprus!Melilotus_italicus_B1.jpg/full/full/0/default.jpg

We better use the Scaler default API using links like

https://pictures.bgbm.org/digilib/Scaler?fn=Cyprus/Arum_rupicola_B2.jpg&mo=file (for full image)

or

https://pictures.bgbm.org/digilib/Scaler?fn=Cyprus/Arum_rupicola_B2.jpg&mo=fit&dw=400&dh=400 (for scaled images)

To implement this the script from #5744 needs to be adapted.
The API is available at: https://robcast.github.io/digilib/scaler-api.html


Related issues

Related to Edit - feature request #9134: Rule based creation of additional media representations "on the fly" Resolved 07/08/2020

Associated revisions

Revision 684783aa (diff)
Added by Andreas Müller 28 days ago

ref #9132 improve length reading for URI based images

Revision 40d1f836 (diff)
Added by Andreas Müller 28 days ago

ref #9132 Cyprus images updated for IIIF and Scaler API

Revision 15d27f3d (diff)
Added by Andreas Müller 21 days ago

ref #9132 add uvfix parameter to Cyprus image import code

History

#2 Updated by Andreas Müller 28 days ago

Keyword has not correct format and can not be parsed: showing abscission zone for file Bromus_fasciculatus_s_delilei_B3.jpg
Keyword has not correct format and can not be parsed: showing lemma and callus for file Bromus_fasciculatus_s_delilei_B4.jpg
More than 1 taxon found for media: Carex egorovae . Will now try to use only taxon with taxon node.
More than 1 taxon found for media: Carex egorovae . Will now try to use only taxon with taxon node.
More than 1 taxon found for media: Carex egorovae . Will now try to use only taxon with taxon node.

Person could not be parsed: G, N. Hadjikyriakou for file Euphorbia_falcata_s_falcata_A1.jpg
Person could not be parsed: G, N. Hadjikyriakou for file Euphorbia_falcata_s_falcata_D1.jpg
Keyword has not correct format and can not be parsed: Date: 16.03.2015 Photographer: G. N. Hadjikyriakou for file Euphorbia_helioscopia_s_helioscopioides_A1.jpg
Keyword has not correct format and can not be parsed: Date: 16.03.2015 Photographer: G. N. Hadjikyriakou for file Euphorbia_helioscopia_s_helioscopioides_B1.jpg
Keyword has not correct format and can not be parsed: Date: 16.03.2015 Photographer: G. N. Hadjikyriakou for file Euphorbia_helioscopia_s_helioscopioides_B2.jpg
More than 1 taxon found for media: Ranunculus neapolitanus . Will now try to use only taxon with taxon node.
More than 1 taxon found for media: Sambucus nigra . Will now try to use only taxon with taxon node.
Incorrect filename:silene_conoidea_D1.jpg

#3 Updated by Andreas Müller 28 days ago

Problem (Could not read block (block start: 14468, block length: 15217440, data length: 65527).) when reading metadata from file: Micromeria_chionistrae_C1.jpg
Problem (Could not read block (block start: 13908, block length: 15217440, data length: 65527).) when reading metadata from file: Micromeria_chionistrae_C2.jpg
Problem (Could not read block (block start: 14572, block length: 15217440, data length: 65527).) when reading metadata from file: Moricandia_arvensis_C3.jpg
Problem (Could not read block (block start: 12164, block length: 15217440, data length: 65527).) when reading metadata from file: Moricandia_arvensis_C4.jpg
Problem (Could not read block (block start: 15136, block length: 15217440, data length: 65527).) when reading metadata from file: Nigella_ciliaris_C7.jpg
Problem (Could not read block (block start: 13546, block length: 15217440, data length: 65527).) when reading metadata from file: Nigella_ciliaris_C8.jpg
Problem (Could not read block (block start: 13584, block length: 15217440, data length: 65527).) when reading metadata from file: Nigella_ciliaris_C9.jpg
Problem (Could not read block (block start: 12388, block length: 15217440, data length: 65527).) when reading metadata from file: Teucrium_karpasiticum_C1.jpg
Problem (Could not read block (block start: 14838, block length: 15217440, data length: 65527).) when reading metadata from file: Teucrium_karpasiticum_C2.jpg
Problem (Could not read block (block start: 12228, block length: 15217440, data length: 65527).) when reading metadata from file: Teucrium_salaminium_C1.jpg
Problem (Could not read block (block start: 15484, block length: 15217440, data length: 65527).) when reading metadata from file: Teucrium_salaminium_C2.jpg
Problem (Could not read block (block start: 14760, block length: 15217440, data length: 65527).) when reading metadata from file: Veronica_bozakmanii_C2.jpg
Problem (Could not read block (block start: 12416, block length: 15217440, data length: 65527).) when reading metadata from file: Veronica_bozakmanii_C3.jpg

#4 Updated by Andreas Müller 28 days ago

Taxon not found: Ophrys kotschyi-sphegodes

#6 Updated by Andreas Müller 28 days ago

AM:

noch ein „kleiner“ Nachtrag. Es gibt im CDM inzwischen >100 „Bilder“, die in als Datei nicht mehr existieren. Dies führt zu Unschönheiten bei der Anzeige. Ich denke, wir sollten die löschen, wollte das aber nicht machen ohne es vorher mit dir abgesprochen zu haben. Kannst du das mal überprüfen?
"Sedum_caespitosum_A3.jpg"
"Beta_vulgaris_C1.jpg"
"Podospermum_alpigenum_A1.jpg"
"Astragalus_echinus_A1.jpg"
"Crypsis_factorovskyi_B1.jpg"
"Crypsis_factorovskyi_B2.jpg"
"Pinguicula_crystallina_B1.jpg"
"Euphorbia_helioscopia_B1.jpg"
"Iris_albicans_A1.jpg"
"Saccharum_ravennae_A1.jpg"
"Sinapis_alba_E1.jpg"
"Lactuca_triquetra_E1.jpg"
"Ononis_variegata_B1.jpg"
"FIlago_pyramidata_B1.jpg"
"Sorbus_graeca_C1.jpg"
"Linum_trigynum_A1.jpg"
"Linum_usitatissimum_B1.jpg"
"Ononis_serrata_A1.jpg"
"Cytinus_hypocistis_B1.jpg"
"Urtica_dioica_s_cypria_B1.jpg"
"Geranium_lucidum_B1.jpg"
"Lindbergella_sintenisii_B1.jpg"
"Matthiola_longipetala_A1.jpg"
"Hypopitys_monotropa_A1.jpg"
"Beta_vulgaris_s_maritima_B1.jpg"
"Podospermum_laciniatum_D2.jpg"
"Helianthemum_sanguineum_A1.jpg"
"Helianthemum_sanguineum_A1.jpg"
"Helianthemum_sanguineum_A1.jpg"
"Cyperus_fuscus_B1.jpg"
"Securigera_cretica_B1.jpg"
"Euphorbia_falcata_s_macrostegia_D1.jpg"
"Carex_flacca_s_serrulata_A1.jpg"
"Epipactis_microphylla_A1.jpg"
"Epilobium_tetragonum_B1.jpg"
"Lapsana_communis_s_communis_D1.jpg"
"Lepidium_latifolium_D1.jpg"
"Malvella_sherardiana_C1.jpg"
"Medicago_lupulina_C1.jpg"
"Nigella_ciliaris_C1.jpg"
"Osyris_alba_A2.jpg"
"Orobanche_orientalis_B2.jpg"
"Silene_muscipula_B2.jpg"
"Vicia_lathyroides_B2.jpg"
"Orobanche_orientalis_B2.jpg"
"Melilotus_elegans_C2.jpg"
"Cynoglossum_natolicum_C2.jpg"
"Ranunculus_bulbosus_s_bulbosus_A1.jpg"
"Symphyotrichum_squamatum_B1.jpg"
"Ranunculus_peltatus_s_peltatus_A1.jpg"
"Astragalus_echinus_A2.jpg"
"Astragalus_echinus_A4.jpg"
"Astragalus_echinus_B2.jpg"
"Astragalus_echinus_B3.jpg"
"Beta_vulgaris_s_maritima_D2.jpg"
"Chaenorhinum_rubrifolium_B1.jpg"
"Cyperus_fuscus_B2.jpg"
"Cyperus_fuscus_B3.jpg"
"Euphorbia_falcata_s_macrostegia_A1.jpg"
"Euphorbia_falcata_s_macrostegia_B1.jpg"
"Euphorbia_falcata_s_macrostegia_D2.jpg"
"Euphorbia_helioscopia_A1.jpg"
"Euphorbia_helioscopia_A2.jpg"
"Euphorbia_helioscopia_A3.jpg"
"Euphorbia_helioscopia_A4.jpg"
"Euphorbia_helioscopia_A5.jpg"
"Euphorbia_helioscopia_D1.jpg"
"Euphorbia_helioscopia_D2.jpg"
"Helianthemum_sanguineum_A1.jpg"
"Iris_albicans_B1.jpg"
"Iris_albicans_B2.jpg"
"Lactuca_triquetra_A1.jpg"
"Lactuca_triquetra_B1.jpg"
"Lactuca_triquetra_B2.jpg"
"Lactuca_triquetra_B3.jpg"
"Lactuca_triquetra_B4.jpg"
"Lactuca_triquetra_C1.jpg"
"Lactuca_triquetra_C2.jpg"
"Lindbergella_sintenisii_B2.jpg"
"Matthiola_longipetala_A2.jpg"
"Matthiola_longipetala_A3.jpg"
"Podospermum_alpigenum_A2.jpg"
"Podospermum_alpigenum_A3.jpg"
"Podospermum_alpigenum_A4.jpg"
"Podospermum_alpigenum_A5.jpg"
"Podospermum_alpigenum_A6.jpg"
"Podospermum_laciniatum_A1.jpg"
"Podospermum_laciniatum_C1.jpg"
"Podospermum_laciniatum_C2.jpg"
"Podospermum_laciniatum_D1.jpg"
"Ranunculus_peltatus_s_peltatus_A1.JPG"
"Ranunculus_peltatus_s_peltatus_A2.JPG"
"Saccharum_ravennae_A3.jpg"
"Saccharum_ravennae_B2.jpg"
"Securigera_securidaca_A1.jpg"
"Securigera_securidaca_B1.jpg"
"Securigera_securidaca_B2.jpg"
"Securigera_securidaca_B4.jpg"
"Securigera_securidaca_D1.jpg"
"Veronica_persica_A1.jpg"
"Veronica_persica_B4.jpg"
"Veronica_persica_C1.jpg"
"Veronica_persica_D1.jpg"
"Podospermum_laciniatum_A2.jpg"
"Podospermum_laciniatum_B1.jpg"
"Podospermum_laciniatum_B2.jpg"

#7 Updated by Andreas Müller 28 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40
SELECT Replace(Replace(uri, 'https://pictures.bgbm.org/digilib/Scaler/IIIF/Cyprus!', ''), '/full/full/0/default.jpg','')
FROM MediaRepresentationPart p
WHERE uri  NOT LIKE 'https://pictures.bgbm.org/digilib/Scaler?fn=Cyprus/%'

#8 Updated by Andreas Kohlbecker 21 days ago

The Universalviewer appends ?t={some-hash} to the image URI. By this the links to the scaler api become invalid and the last parameter it not parsed correctly.

Invalid URI with appended parameter t (last parameter as parsed in bold letters, white space after schema part for formatting ):

https: //pictures.bgbm.org/digilib/Scaler?fn=Cyprus/Arum_rupicola_B2.jpg&mo=fit&dw=400&dh=400?t=1594725873250

adding an additional dummy parameter (uvfix for "universalviewer fix") to the end of the query part help parse the parameters:

https: //pictures.bgbm.org/digilib/Scaler?fn=Cyprus/Arum_rupicola_B2.jpg&mo=fit&dw=400&dh=400&uvfix=1?t=1594725873250

==> adapt the thumbnail URIs accordingly

#10 Updated by Andreas Kohlbecker 21 days ago

  • Related to feature request #9134: Rule based creation of additional media representations "on the fly" added

#11 Updated by Andreas Müller 21 days ago

I updated data in cyprus

UPDATE MediaRepresentationPart p
SET uri = Concat(uri, '&uvfix=1')
WHERE p.uri LIKE '%&mo=fit&dw=400&dh=400' OR p.uri LIKE '%&mo=fit&dw=200&dh=200'

and adapted the import code

#12 Updated by Andreas Müller 21 days ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • % Done changed from 40 to 50

The above problems are all solved and discussed with Ralf so I guess we can close this ticket.

#13 Updated by Andreas Kohlbecker 20 days ago

Andreas Müller wrote:

The above problems are all solved and discussed with Ralf so I guess we can close this ticket.

Let's wait for Ralfs answer regarding the decision if mo=fit or mo=crop should be used.

#14 Updated by Andreas Kohlbecker 16 days ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 50 to 40

Ralf voted for cropping the images (Email from 16.07.20 17:58)

#15 Updated by Andreas Kohlbecker 16 days ago

I modified the small thumbnails images with following sql statement:

UPDATE  MediaRepresentationPart p set p.uri = replace(uri, '&mo=fit&dw=200&dh=200', '&mo=crop&dw=200&dh=147') , height=147, width=200 where p.uri LIKE '%&mo=fit&dw=200&dh=200%'

in the test-server.

This does not work for the UV as hoped. The UV takes the aspect ration of the first full resolution image as default, for all thumbnail images. So using the crop function is not the complete solution.

This is task still requires more research.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)