In QGIS 18.104.22.168 when exporting Print composer layout to image (.png, .jpeg) I get the following error message: "Cannot write to C:\xxxxx.png. This file may be open in another application". This file does not yet exist so is not open in another application. Exporting to .pdf and .svg works but export to image doesn't. Any ideas?
The fix would be to not include a period
. in the output file name. I have verified this in
QGIS version 3.6.2-Noosa
Example, if your print composer layout is named
Atlas test-8.5x11, when you output a raster, then be sure to name the output file without any extra
For vector output, such as PDF or SVG, you do not have to do anything different, as it will work as expected.
This QGIS issue, https://github.com/qgis/QGIS/issues/26308, titled Error exporting layout with "." (full stop) in filename mentions the error code
"Cannot write to
<FILE_LOCATION>. This file may be open in another application." The file is not open in another application.