A Library containing the powerful libPhoto directive for displaying images. And some pre-made photo displaying components that make use of it.
Displays an image in any size of container. Depending on how the shapes of the image and the container compare to one another, the image is cropped vertically or horizontally.
When the container has a wider ratio than the image, the photo is cropped vertically to fit like this
For each image you may pass in a focus point as a percentage of the width and height, which centers the cropping (as much as possible)
Lets choose {x: 70, y: 58}, a point on the nose of Simba
npm install --save ng-photo-lib@latest
<div libPhoto='http://myphotourl'>
<div [libPhoto]='{ url: "http://myphotourl", focusPosition: new Position({ x: 50, y: 50 })>
<!-- Requires consumer to set the size of this component -->
<lib-photo-show [photos]='myPhotosArray' [interval]='10'></lib-photo-show>
<!-- Requires consumer to set the size of this component -->
<lib-photo-gallery [photos]='myPhotosArray'></lib-photo-gallery>