{"id":1551,"date":"2016-09-19T12:51:07","date_gmt":"2016-09-19T12:51:07","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=1551"},"modified":"2016-09-19T12:51:07","modified_gmt":"2016-09-19T12:51:07","slug":"image-focal-point-hint","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2016\/09\/19\/image-focal-point-hint\/","title":{"rendered":"Image focal point hint"},"content":{"rendered":"<p style=\"text-align: left;\">This is a quick idea that may already exist somewhere. Let me know if &#8220;there&#8217;s a vocab for that&#8221;.<\/p>\n<p style=\"text-align: left;\">We have a large set of images of our university buildings. There&#8217;s a variety of sizes &amp; aspect ratios. Sometimes there&#8217;s more than one image of a building.<\/p>\n<p style=\"text-align: left;\">To render these in the university templates we need to trim them to certain sizes and aspect ratios. What would be useful is if we could store a &#8220;hint&#8221; of where the most important content is in the picture. For example take this image:<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1552\" src=\"http:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic-300x169.jpg\" alt=\"tinkering\" width=\"300\" height=\"169\" srcset=\"https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic-300x169.jpg 300w, https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: left;\">Clearly the most important part of this picture is the relationship between the researcher and the tool. I would say about here:<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1553\" src=\"http:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic2-300x169.jpg\" alt=\"tinker with X\" width=\"300\" height=\"169\" srcset=\"https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic2-300x169.jpg 300w, https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic2.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: left;\">Which is about 36% from the left, and 50% from the bottom. What I&#8217;m wondering is if there is (or should be) some standard terms for indicating the focal point of this picture eg.<\/p>\n<pre style=\"text-align: left;\">&lt;http:\/\/example.com\/pictures\/research.jpg&gt; ns:focalPointX \"0.36\"^xsd:float .\r\n&lt;http:\/\/example.com\/pictures\/research.jpg&gt; ns:focalPointY \"0.5\"^xsd:float .<\/pre>\n<p style=\"text-align: left;\">That way our HTML page generation can get cropped images but instead of a default focus (usually the centre point) it could know how to crop for this picture. You can see the results of making a portrait crop of this image using a focal point hint and without:<\/p>\n<p style=\"text-align: center;\">Without hint:<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1554\" src=\"http:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic4-300x169.jpg\" alt=\"pic4\" width=\"300\" height=\"169\" srcset=\"https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic4-300x169.jpg 300w, https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic4.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: center;\">Using hint:<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1555\" src=\"http:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic3-300x169.jpg\" alt=\"pic3\" width=\"300\" height=\"169\" srcset=\"https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic3-300x169.jpg 300w, https:\/\/blog.soton.ac.uk\/webteam\/files\/2016\/09\/pic3.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: left;\">I think this makes a massive difference and seems like a really useful thing to optionally store with our images and publish as part of the metadata for them in the <a href=\"http:\/\/data.southampton.ac.uk\/\">open data service<\/a>.<\/p>\n<p style=\"text-align: left;\">Other useful metatags for images linked in open data would be:<\/p>\n<ul>\n<li style=\"text-align: left;\">An indication that this image should be treated as the illustrative image of something.<\/li>\n<li style=\"text-align: left;\">For logos; if the image is more suited for a light or dark background (ideally letting the renderer pick the more suitable variation<\/li>\n<li style=\"text-align: left;\">For background style images, a hint if the image is a light or dark background (so we know how to place contrasting text over the top.)<\/li>\n<\/ul>\n<p>Does this exist already somewhere out in ontology land? Are there any other useful things we should add?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a quick idea that may already exist somewhere. Let me know if &#8220;there&#8217;s a vocab for that&#8221;. We have a large set of images of our university buildings. There&#8217;s a variety of sizes &amp; aspect ratios. Sometimes there&#8217;s more than one image of a building. To render these in the university templates we [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[198,136],"tags":[],"class_list":["post-1551","post","type-post","status-publish","format-standard","hentry","category-best-practice","category-rdf"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/1551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=1551"}],"version-history":[{"count":1,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/1551\/revisions"}],"predecessor-version":[{"id":1556,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/1551\/revisions\/1556"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=1551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=1551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=1551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}