WIP to fix

This commit is contained in:
Florent Guiotte 2026-03-02 18:07:45 +01:00
parent cc25b34330
commit 04f0d055f9
3 changed files with 5 additions and 47 deletions

View File

@ -1,36 +0,0 @@
{%- assign img_path = include.path | remove: ".jpg" | remove: ".jpeg" | remove: ".png" | remove: ".tiff" -%}
<figure>
<picture>
{% if site.imagemagick.enabled %}
{% for i in site.imagemagick.widths -%}
<source
class="responsive-img-srcset"
media="(max-width: {{ i }}px)"
srcset="{{ img_path | relative_url }}-{{ i }}.webp"
/>
{% endfor -%}
{% endif %}
<!-- Fallback to the original file -->
<img
src="{{ include.path | relative_url }}"
{% if include.class %}class="{{ include.class }}"{% endif %}
{% if include.width %}width="{{ include.width }}"{% else %}width="auto"{% endif %}
{% if include.height %}height="{{ include.height }}"{% else %}height="auto"{% endif %}
{% if include.min-width %}min-width="{{ include.min-width }}"{% endif %}
{% if include.min-height %}min-height="{{ include.min-height }}"{% endif %}
{% if include.max-width %}max-width="{{ include.max-width }}"{% endif %}
{% if include.max-height %}height="{{ include.max-height }}"{% endif %}
{% if include.alt %}alt="{{ include.alt }}"{% endif %}
{% if include.title %}title="{{ include.title }}"{% endif %}
{% if include.zoomable %}data-zoomable{% endif %}
onerror="this.onerror=null; $('.responsive-img-srcset').remove();"
/>
</picture>
{%- if include.caption -%}<figcaption class="caption">{{ include.caption }}</figcaption>{%- endif %}
</figure>

View File

@ -23,13 +23,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
{% include figure.html path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %}
{% include figure.liquid path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
{% include figure.html path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %}
{% include figure.liquid path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
{% include figure.html path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %}
{% include figure.liquid path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">

View File

@ -25,8 +25,7 @@ updated.
[test]: https://github.com/fguiotte/sap/tree/master/test
[cover]: https://app.codecov.io/gh/fguiotte/sap/tree/master/sap
## Installation
## Installation
To start tinkering images with the package, you just have to:
@ -53,7 +52,7 @@ plt.imshow(filtered_image)
plt.show()
```
## Slower launch
## Slower launch
This package is a combination of three submodules.
@ -72,8 +71,6 @@ area = t.get_attribute('area')
filtered_image = t.reconstruct(area < 100)
```
### Profiles
The second submodule `sap.profiles` is provided to compute *Attribute
@ -99,7 +96,6 @@ The third submodule is `sap.spectra`. We use it to compute Pattern
Spectra of trees and to display them. Pattern Spectra can be useful to
set thresholds of attribute filters and Attribute Profiles.
```python
import rasterio as rio # Reads and writes geospatial raster data
from matplotlib import pyplot as plt # Display plots and images
@ -130,10 +126,8 @@ plt.show()
![](/assets/img/sap_2.png){.img-fluid .z-depth-1 .rounded}
To go further, please have a look to the [online documentation][doc-api].
This package has been used, amongst other projects, to perform an
experimental comparison of the attribute profiles and their variations
in a published paper [^1].