Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Renari
Copy link

@Renari Renari commented Oct 1, 2025

This should add support for OCR on Plasma. I've tested the screenshots working however due to issues with none of the OCR configs I've tried working I haven't seen it fully function (Manga OCR reports that it's output it unexpected and tesseract says it fails 7/7 steps).

@Renari
Copy link
Author

Renari commented Oct 2, 2025

It looks like there's an issue with this if you use scaling on HiDPI monitors, since spectacle takes sceenshots at full resolution:

https://bugs.kde.org/show_bug.cgi?id=368939

So the coordinates reported by slurp are not accurate in this scenario. I submit a PR to Spectacle to support this here:

https://invent.kde.org/plasma/spectacle/-/merge_requests/479

This would allow us to have a slurp like capture mode using only spectacle.

@Renari
Copy link
Author

Renari commented Oct 2, 2025

It looks like this might also be able to be implemented over DBUS, assuming org.kde.KWin.ScreenShot2.CaptureInteractive or org.kde.KWin.ScreenShot2.CaptureArea does what it implies.

❯ qdbus6 org.kde.KWin.ScreenShot2 /org/kde/KWin/ScreenShot2
property read uint org.kde.KWin.ScreenShot2.Version
method QVariantMap org.kde.KWin.ScreenShot2.CaptureActiveScreen(QVariantMap options, QDBusUnixFileDescriptor pipe)
method QVariantMap org.kde.KWin.ScreenShot2.CaptureActiveWindow(QVariantMap options, QDBusUnixFileDescriptor pipe)
method QVariantMap org.kde.KWin.ScreenShot2.CaptureArea(int x, int y, uint width, uint height, QVariantMap options, QDBusUnixFileDescriptor pipe)
method QVariantMap org.kde.KWin.ScreenShot2.CaptureInteractive(uint kind, QVariantMap options, QDBusUnixFileDescriptor pipe)
method QVariantMap org.kde.KWin.ScreenShot2.CaptureScreen(QString name, QVariantMap options, QDBusUnixFileDescriptor pipe)
method QVariantMap org.kde.KWin.ScreenShot2.CaptureWindow(QString handle, QVariantMap options, QDBusUnixFileDescriptor pipe)
method QVariantMap org.kde.KWin.ScreenShot2.CaptureWorkspace(QVariantMap options, QDBusUnixFileDescriptor pipe)
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties)
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()

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

Successfully merging this pull request may close these issues.

1 participant