<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Michael,</p>
<p>I'm not totally sure if image composition really belongs to
gdaldem. It feels it is more generic than that, although making
nice looking DEM rendering is definitely a common use case.
There's this long existing Python script at
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/swig/python/gdal-utils/osgeo_utils/samples/hsv_merge.py">https://github.com/OSGeo/gdal/blob/master/swig/python/gdal-utils/osgeo_utils/samples/hsv_merge.py</a>
that combines the hillshade and color-relief together.</p>
<p>In the ecosystem at large, ImageMagick has also a lot of
compositing operators: <a class="moz-txt-link-freetext" href="https://imagemagick.org/Usage/compose/">https://imagemagick.org/Usage/compose/</a></p>
<p>If we added a utility in GDAL, it would have to be decided if it
allows different georeferencing/extent of images to be composed
together. That would likely brings a bit of complexity, although
using on-the-fly VRT underneath could help making images with the
same size, resolution, extent.</p>
<p>There's also the question of if we would need this to be able to
operate in a VRT-ish way (a new subset of VRT would then be
needed), because that would have a strong impact on the design,
compared to having a utility that materializes the output in a
regular file format.</p>
<p>Even<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 09/07/2024 à 03:12, Michael Sumner
via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAcGz996woYN6fDhwURSPVx7euQqHf0FXTmSjaRuzpdsrfnHOA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">Just an update, I have found out how to do this
numerically. Will consider a PR for gdaldem if I can make
it work at some point.
<div><br>
</div>
<div>Thanks, Mike</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2024 at
7:31 AM Michael Sumner <<a
href="mailto:mdsumner@gmail.com" moz-do-not-send="true"
class="moz-txt-link-freetext">mdsumner@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Is it possible to "layer" one image over
another, the first at full transparency and the second
with partial transparency?
<div><br>
</div>
<div>I'm thinking of combining a hillshade and a
(partially) transparent color-relief image, a visual
enhancement technique. (I know how to do this
downstream in R and Python or similar, I'd like to stay
in C++'s warm embrace. )</div>
<div><br>
</div>
<div>I can go and find out what "over plot" means when it
comes to colour imagery, just wondering if there's
anything in-built already. This might be a nice
additional mode to gdaldem (and is what I thought
"color-relief" meant, at first). <br clear="all">
<div><br>
</div>
<div>Cheers, Mike</div>
<div><br>
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Michael Sumner<br>
Research Software Engineer<br>
Australian Antarctic Division<br>
Hobart, Australia<br>
e-mail: <a href="mailto:mdsumner@gmail.com"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">mdsumner@gmail.com</a></div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Michael Sumner<br>
Research Software Engineer<br>
Australian Antarctic Division<br>
Hobart, Australia<br>
e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">mdsumner@gmail.com</a></div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>