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

Crash with zoom != 1.0 running QGIS in debug mode #19

Open
nirvn opened this issue Jun 25, 2021 · 1 comment
Open

Crash with zoom != 1.0 running QGIS in debug mode #19

nirvn opened this issue Jun 25, 2021 · 1 comment

Comments

@nirvn
Copy link

nirvn commented Jun 25, 2021

First, nice plugin, thanks!

When running QGIS in debug mode (where ASSERTs will kill the app), the plugin causes QGIS to die when the zoom != 1.0. That's because the painter's DPI doesn't match the output DPI.

The way to fix this is to declare a DPI in the QImage used to paint the map:

                # create output image and initialize it
                image = QImage(QSize(width, height), QImage.Format_RGB555)
                image.setDotsPerMeterX(target_dpi / 0.0254);
                image.setDotsPerMeterY(target_dpi / 0.0254);
                image.fill(qRgb(255, 255, 255))
@esan0
Copy link
Contributor

esan0 commented Sep 7, 2022

@nirvn could you test the latest version of the plugin and report back whether you are seeing the same error or not?

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