gvellut / FreehandRasterGeoreferencer

QGIS plugin for the interactive georeferencing of rasters
GNU General Public License v2.0
49 stars 13 forks source link

Is there a way to control opacity of extra space around a rotated image? #57

Open LorenAmelang opened 2 years ago

LorenAmelang commented 2 years ago

I've figured out how to use the “Export raster with world file” tool, and get iPad Mergin Maps to see my georeferenced image files. But when the images are rotated, some of them are in a larger bounding box with a dark fill. (It is set to 50% opacity in the screenshot.)

image

Is there a way to avoid that or make it transparent? That layer began as a jpg file. The also angled png drawing behind it did not get a box.

Actually I'm not sure why that inner image is rotated like that, but before I used the “Export raster with world file” function it just stopped with a rotated boundary, not hiding other layers. The “Export raster with world file” function put the dark box around it.

Sorry if I'm just ignorant of an obvious solution... I do tend to jump in over my head...

gvellut commented 2 years ago

What option did you use when you exported? The default is to bake in the rotation inside the exported image (so the world file contains only translation and scaling; No rotation). There is an option (checkbox) to leave the image as is and put the rotation in the world file: That feature is not be supported by some GIS software (at least ArcGIS at the time it was developed) so this is why it is optional.

If you used the default and exported with the .jpg extension, it may be that the borders come from the JPEG format, which doesn't support transparency. In this case, the part of the image that should be transparent would be black.

Try this:

LorenAmelang commented 2 years ago

"What options" is a problem, because of this: https://github.com/qgis/QGIS/issues/49775 and this: https://github.com/gvellut/FreehandRasterGeoreferencer/issues/58

Even if the scaling didn't hide my choices, the night mode would! I just use the default and usually it works!

In my issue 58 reply it looks like the rotation is in the .qgs file.

I did notice my rotated .png didn't get the black borders - guess that's the solution!

Thanks!