domlysz / BlenderGIS

Blender addons to make the bridge between Blender and geographic data
GNU General Public License v3.0
7.83k stars 1.36k forks source link

Jpeg with jgw file not importing. png does work #568

Open baswein opened 3 years ago

baswein commented 3 years ago

Blender and OS versions

Blender 2.93.0 - Windows 10- BlenderGIS-225 (version: (2, 2, 5)

Describe the bug

Thank you for your amazing plugin! I get an "Unable to open raster, check logs for more infos" error message when trying to import a jpeg with a .jgw file. When I export the file from QGIS 3.22 as a png instead it works fine.

How to Reproduce

Export an image from QGIS (project>import/export>export map to image) as a .jpeg with a world file. Try to import this file into blender as a basemap in new plane. get error.

I have attached the working png and the not working jpeg. They are both in EPSG:4326.

xref - topo.zip

domlysz commented 2 years ago

The file extension should be .jpg not .jpeg otherwise the addon can not found the worldfile !

I will do a quick fix to handle this case

baswein commented 2 years ago

Ha! One of those. Thanks! As an aside: Did you know after 20 years Sketchup still can't handle .jpegs and only works with .jpgs. So +1 for BlenderGIS.

baswein commented 2 years ago

I took a couple of python classes recently and so I thought it might be fun to see if I could fix it. Ignore the pull request if you like.