Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LorenAmelang opened this issue Aug 25, 2022 · 2 comments

Comments

@LorenAmelang
Copy link

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
Copy link
Owner

gvellut commented Aug 28, 2022

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:

  • If it doesn't make the image too heavy, export using a .png extension and see if it makes a difference when you reimport into iPad Mergin Maps.
  • If that is not suitable, try exporting in JPEG but using the option to put the rotation into the world file.

@LorenAmelang
Copy link
Author

"What options" is a problem, because of this:
qgis/QGIS#49775
and this:
#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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants