Zala is a screenshot tool designed to capture images of your desktop. It has options to capture a specific region of the screen. Built using PyQt, Zala can be integrated into Python projects as a dependency.
If you're looking for a standalone program to create screenshots and don't plan to integrate it into a PyQt project, consider using maim. Maim is written in a more efficient language.
pipx install zalaZala can be integrated into PyQt6 projects as a library. The example below shows how to capture a screenshot and let the user select a region.
import sys
from PyQt6.QtWidgets import QApplication
from zala.main_window import ZalaSelect, UserSelectionResult
from zala.screenshot import ZalaScreenshot
def main() -> None:
app = QApplication(sys.argv)
scr = ZalaScreenshot(app)
def on_selection_finished(result: UserSelectionResult) -> None:
if result.pixmap:
result.pixmap.save("screenshot.png")
app.quit()
sel = ZalaSelect(scr.capture_screen())
sel.selection_finished.connect(on_selection_finished)
sel.showFullScreen()
app.exec()
if __name__ == "__main__":
main()Take a region of the screen.
zala selectVerbose mode.
zala select -vShow commands.
zala