w3c / epub-specs

Shared workspace for EPUB 3 specifications.
Other
306 stars 60 forks source link

Regions of image files #480

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current draft [1] of Region-based Navigation specifies regions of
image files (e.g., href="page1.jpg#xywh=percent:5,5,15,15").  Image
files are resources and regions are captured by fragment identifiers.

Such image files are NOT top-level spine items.  They are rather
referenced by HTML content documents (often via SVG within HTML) or
SVG content documents.  Reading systems display (at least parts of)
such content documents during the region-based navigation.

We find several problems:

- This is a internal hyperlink to a resource outside the spine.  
  Such links are disallowed in EPUB and reported as errors by 
  epubcheck. 

- An image file may be shared by multiple top-level content 
  documents.  Which one should be displayed?

- Wrapper HTML or SVG may specify scaling or offsets.  

- Wrapper HTML or SVG may specify more than one image file.

Here is a proposed solution:

- Use top-level fixed-layout content documents rather than 
  image files.

- Specify regions in relative to viewports of fixed 
  layout content documents.

Example: 

  href="page1.html#xywh=percent:5,5,15,15" 

rather than 

  href="page1.jpg#xywh=percent:5,5,15,15"

[1] 
https://docs.google.com/document/d/1eJmJshgmSuA8uDtnpZBYZtJ0UAawVCnPtlv4rD-v_6Y/
edit#‏

Original issue reported on code.google.com by eb2m...@gmail.com on 14 Nov 2014 at 12:01

GoogleCodeExporter commented 9 years ago

Original comment by eb2m...@gmail.com on 14 Nov 2014 at 12:03

GoogleCodeExporter commented 9 years ago
From the use cases that we envision (namely, enhancing the reading experience 
on smaller screens, doing the panel-by-panel for comics, etc....) I don't think 
that the solution would degrade the usability of the spec. The viewport is 
always the rectangle that we want slice into smaller parts for navigation

I vaguely remember some use cases that were brought forward during the early 
stages of the WG, for example creating a dedicated navigation through specific 
areas of a painting that would be part of a page. It was a very abstract 
example where it was envisoned that the regions would be defined on the image 
of the painting rather than on the page... It was probably pushing the concept 
of creating regions a bit too far.

matthieu

Original comment by mk...@aquafadas.com on 20 Nov 2014 at 9:29

GoogleCodeExporter commented 9 years ago

Original comment by mgarrish on 21 Nov 2014 at 12:28

GoogleCodeExporter commented 9 years ago
Has this change already been integrated to EPUB Region-Based Navigation (Draft 
Specification 14 November 2014)? I see the example markup snippets do now 
reference XHTML documents, but I find no mention that they must be top-level 
content documents (i.e. they must exist in the spine).

See my related comment in the draft at 
https://docs.google.com/document/d/1eJmJshgmSuA8uDtnpZBYZtJ0UAawVCnPtlv4rD-v_6Y/
edit#heading=h.tuxxdtrm9kbf

Original comment by chocolat...@gmail.com on 24 Nov 2014 at 1:50

GoogleCodeExporter commented 9 years ago
hi
The latest edit in the spec clarifies this point through the following 
modification : The IRI [RFC3987] defined in the href attribute must reference a 
Fixed-Layout Document  and  may include a media fragment [MediaFrag] that 
defines, or identifies, the Region. Additional information on the expression of 
media fragments is included in 3.4 Defining Regions of Interest.

An explicit reference to a Fixed-Layout Document for the href has been added.

Original comment by mk...@aquafadas.com on 25 Nov 2014 at 11:15

GoogleCodeExporter commented 9 years ago

Original comment by mgarrish on 14 Mar 2015 at 1:49