<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Maybe this has to do with this longstanding issue:</div>

<div>https://github.com/qgis/QGIS/issues/23760</div>

<div> </div>

<div>Regards,</div>

<div>Roland</div>

<div> 
<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 01. Oktober 2021 um 11:30 Uhr<br/>
<b>Von:</b> "L.W." <eaglelw@gmx.de><br/>
<b>An:</b> "Charles Dixon-Paver" <charles@kartoza.com><br/>
<b>Cc:</b> "qgis-user@lists.osgeo.org" <qgis-user@lists.osgeo.org><br/>
<b>Betreff:</b> Re: [Qgis-user] Geo Raster Background</div>

<div name="quoted-content">
<p>I think one of us is on the wrong track with what is to be achieved.<br/>
<br/>
I don't want to manipulate the image itself, just the background at the moment when the raster image (or raster pdf) is converted to a TIF and georeferenced.<br/>
<br/>
if the rectangle contains black text, as described, this would also be manipulated after the described manipulation, that's not what I want.<br/>
<br/>
Thank you for your efforts.</p>

<p> </p>

<div class="moz-cite-prefix">Am 01.10.2021 um 10:49 schrieb Charles Dixon-Paver:</div>

<blockquote>
<div>You can translate pixel values with the raster calculator (available under the raster menu). Black pixels will have a value of 0,0,0 on RGB bands and red pixels would have a value of 255,0,0 so it's just a matter of changing the values accordingly on those bands.
<div> </div>

<div>The raster calculator will contain an if expression in the next QGIS release, but if you're using an existing release you will have to use a bit of a quirky syntax to achieve that.</div>

<div> </div>

<div>So if you select the red band and use an expression similar to <font face="monospace">( "Image@1" =  0 )  *  255</font> it should work. If you need assistance on raster calculator syntax gis stack overflow has a large number of Q&A on the topic.</div>

<div> </div>

<div>If you need info on a particular pixel value at each band, just use the identify features tool (it works on rasters too).</div>

<div> </div>

<div>Note that the previous statement about the GIS identifying valid data values from background pixel values still applies to the calculator.</div>

<div> </div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr">On Fri, 1 Oct 2021 at 10:36, L.W. <<a href="mailto:eaglelw@gmx.de" onclick="parent.window.location.href='mailto:eaglelw@gmx.de'; return false;" target="_blank">eaglelw@gmx.de</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<p>Thanks for answering, but I think this is not the way I want to go ...</p>

<p>Or, I do not have written detailed.</p>

<p>I have a raster image e.g. a white rectangle, after setting the points, QGIS rotats this image, let's say, by 45 degrees.</p>

<p>The corners of the imported image are now black triangles.</p>

<p>I do want to have e.g. red triangles ...</p>

<p>Regards</p>

<p> </p>

<div>Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:</div>

<blockquote>
<div>There's not really any way for a GIS system to automatically differentiate between black background pixels and black data pixels. QGIS supports users setting custom pixel values to render as transparent pixels, but it's left up to users to ensure that their data and background values are different.<br/>
<br/>
>From my view, there are a couple of options when it comes to fixing this issue in your data. One is to use an image processing tool like GIMP or Photoshop effectively, but that requires retaining the geographic information and knowing how to reprocess the raster accordingly.<br/>
<br/>
The simplest solution I'm aware of is probably to follow this workflow in QGIS:
<ul>
        <li>Start a new QGIS project</li>
        <li>Set all black pixels to transparent in the transparency tab of the raster layer properties</li>
        <li>Digitize a "bounding area" - you can do this with a memory layer</li>
        <li>Move your vector layer to render underneath the raster</li>
        <li>Give the vector a simple black symbology</li>
        <li>Use the "Convert map to raster" tool from the processing toolbox</li>
</ul>

<div>There are a wide number of variations on that workflow that are possible of course, but I think that's the easiest to get started.
<div> </div>

<div>Regards</div>

<div> </div>
</div>
</div>

<div> </div>
 

<div class="gmail_quote">
<div class="gmail_attr">On Fri, 1 Oct 2021 at 09:28, L.W. <<a href="mailto:eaglelw@gmx.de" onclick="parent.window.location.href='mailto:eaglelw@gmx.de'; return false;" target="_blank">eaglelw@gmx.de</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">Hi,<br/>
<br/>
how to change the backgroundcolor of a georeferenzed raster image?<br/>
<br/>
When a raster image is rotated by qgis after setting all points the<br/>
backgroundcolor is black RGB(0,0,0).<br/>
<br/>
Set black to transparent is difficult when there is black text.<br/>
<br/>
regards<br/>
<br/>
_______________________________________________<br/>
Qgis-user mailing list<br/>
<a href="mailto:Qgis-user@lists.osgeo.org" onclick="parent.window.location.href='mailto:Qgis-user@lists.osgeo.org'; return false;" target="_blank">Qgis-user@lists.osgeo.org</a><br/>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br/>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</div>
</div>
</div></div></body></html>