<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>460320</bug_id>
          
          <creation_ts>2022-10-12 16:47:00 +0000</creation_ts>
          <short_desc>Add OCR feature</short_desc>
          <delta_ts>2025-11-15 14:53:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>Spectacle</product>
          <component>General</component>
          <version>20.12.3</version>
          <rep_platform>Debian stable</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=488582</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="kono93">kochnorman</reporter>
          <assigned_to name="Jhair Paris">dev</assigned_to>
          <cc>4wy78uwh</cc>
    
    <cc>akid.anis799</cc>
    
    <cc>andrea.ippo</cc>
    
    <cc>christian.tallner</cc>
    
    <cc>dev</cc>
    
    <cc>fanzhuyifan</cc>
    
    <cc>geqch0akc</cc>
    
    <cc>kde</cc>
    
    <cc>madness742</cc>
    
    <cc>me</cc>
    
    <cc>nate</cc>
    
    <cc>ostap.tymchenko</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/spectacle/-/merge_requests/462</cf_commitlink>
          <cf_versionfixedin>25.12.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2160448</commentid>
    <comment_count>0</comment_count>
    <who name="kono93">kochnorman</who>
    <bug_when>2022-10-12 16:47:00 +0000</bug_when>
    <thetext>SUMMARY
***
It would be great to be able to OCR screenshots directly, so you can copy text from them or make them searchable via pdfgrep.
This could be done by Tesseract, enabled only if installed, and would kind of easy to add, but very useful.
***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2193452</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-01-05 18:47:03 +0000</bug_when>
    <thetext>*** Bug 463177 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2220141</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-04-03 23:20:24 +0000</bug_when>
    <thetext>*** Bug 467942 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2223608</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-04-18 19:14:54 +0000</bug_when>
    <thetext>Skanpage is already using Tesseract for OCR, so that could be a place to look for inspiration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2225280</commentid>
    <comment_count>4</comment_count>
    <who name="">akid.anis799</who>
    <bug_when>2023-04-25 04:17:29 +0000</bug_when>
    <thetext>as a workaround one could try to use this command for OCR with spectacle:

For X11:
`spectacle --nonotify --region --background -o /proc/selt/fd/1 |  tesseract stdin stdout | xclip -in -selection clipboard`

For Wayland:
`spectacle --nonotify --region --background -o /proc/selt/fd/1 | tesseract stdin stdout | wl-copy`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2244917</commentid>
    <comment_count>5</comment_count>
    <who name="Andrea Ippolito">andrea.ippo</who>
    <bug_when>2023-08-07 12:18:29 +0000</bug_when>
    <thetext>Normcap is doing this, although it&apos;s a standalone app:
https://github.com/dynobo/normcap/

Maybe worth looking into/getting in touch with the DEV.

May I add, it would be cool if OCR capabilities weren&apos;t limited to Spectacle, but somehow baked-in in some frameworks part, and then be usable by any KDE app that can display images by pressing a button and having the detected text appear as overlay (e.g. gwenview showing a photo of a receipt, okular showing a page that was scanned without OCR, etc).

Sounds complex and impacting quite some apps, but would be a wonderful productivity addition (if OCR accuracy is spot-on)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2244995</commentid>
    <comment_count>6</comment_count>
    <who name="ostap-tymur-tymchenko">ostap.tymchenko</who>
    <bug_when>2023-08-07 18:29:35 +0000</bug_when>
    <thetext>(In reply to andrea.ippo from comment #5)
&gt; Normcap is doing this, although it&apos;s a standalone app:
&gt; https://github.com/dynobo/normcap/
&gt; 
&gt; Maybe worth looking into/getting in touch with the DEV.
&gt; 
&gt; May I add, it would be cool if OCR capabilities weren&apos;t limited to
&gt; Spectacle, but somehow baked-in in some frameworks part, and then be usable
&gt; by any KDE app that can display images by pressing a button and having the
&gt; detected text appear as overlay (e.g. gwenview showing a photo of a receipt,
&gt; okular showing a page that was scanned without OCR, etc).
&gt; 
&gt; Sounds complex and impacting quite some apps, but would be a wonderful
&gt; productivity addition (if OCR accuracy is spot-on)

I dont think it would actually be so hard. Tesseract OCR is both very advanced and open source. All KDE would have to do is to have it preinstalled, and then implement it into the apps. obviously implementing it would be a lot of work but having it be in KDE isnt hard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2266999</commentid>
    <comment_count>7</comment_count>
    <who name="">akid.anis799</who>
    <bug_when>2023-11-19 09:53:19 +0000</bug_when>
    <thetext>New workaround for using ocr with spectacle

For X11:
spectacle --nonotify --region --background -o /tmp/screenshot.png &amp;&amp; tesseract /tmp/screenshot.png stdout | xclip -in -selection clipboard

For Wayland:
spectacle --nonotify --region --background -o /tmp/screenshot.png &amp;&amp; tesseract /tmp/screenshot.png stdout | wl-copy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2312404</commentid>
    <comment_count>8</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2024-04-18 01:04:46 +0000</bug_when>
    <thetext>*** Bug 479412 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2348739</commentid>
    <comment_count>9</comment_count>
    <who name="Ember">me</who>
    <bug_when>2024-08-26 07:49:14 +0000</bug_when>
    <thetext>This may well be out of scope, but i&apos;d also like the OCR result to be saved.. somewhere, preferably in the image, so that i may search for text content of screenshots through dolphin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2448117</commentid>
    <comment_count>10</comment_count>
    <who name="Cherkah">cherkaba</who>
    <bug_when>2025-08-17 15:22:45 +0000</bug_when>
    <thetext>+1 for ocr implementation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2466670</commentid>
    <comment_count>11</comment_count>
    <who name="Jhair Paris">dev</who>
    <bug_when>2025-10-30 17:03:43 +0000</bug_when>
    <thetext>Hi, take a look at this MR https://invent.kde.org/plasma/spectacle/-/merge_requests/462</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>