Skip to content

batch_export plugin: add toggle for bilinear filtering

Austin Anderson requested to merge sabslikesobs/krita:master into master

The batch_export plugin scales exported images with QImage::smoothScaled() 1, which was removed in Qt 6 in favor of QImage::scaled() 2. This change:

  • Replaces the deprecated smoothScaled() with scaled()
  • Adds a new "b=no" ("bilinear") option, enabling unfiltered exports for game assets, pixel art, etc.
  • Notes that the "t=no" option is not inheritable, which I discovered when using the plugin.

Test Plan

  1. Enable the "Batch Exporter" Python plugin
  2. Add a layer with some contents named "bilinear e=png s=200"
  3. Duplicate the layer, name it "nearest e=png b=no s=200"
  4. In the "Batch Exporter" docker, click "Export All Layers"
  5. ./export/bilinear.png is filtered; ./export/nearest.png is not.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken.
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
    • Checked pep8, my changes don't introduce any new warnings
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Merge request reports

Loading