Added OCR processor

This commit is contained in:
2024-03-15 23:34:58 -05:00
parent 4cbdf1432d
commit 1d671d8f23
7 changed files with 191 additions and 8 deletions

View File

@@ -50,6 +50,7 @@ class ImageView(ImageViewMixin, Gtk.Image):
event_system.subscribe("size_allocate", self._size_allocate)
event_system.subscribe("handle_file_from_dnd", self._handle_file_from_dnd)
event_system.subscribe("get_active_image_path", self._get_active_image_path)
event_system.subscribe("zoom_out", self._zoom_out)
event_system.subscribe("rotate_left", self._rotate_left)
event_system.subscribe("vertical_flip", self._vertical_flip)
@@ -85,7 +86,9 @@ class ImageView(ImageViewMixin, Gtk.Image):
if not self.work_pixbuff:
self.set_as_static(path)
self.pixbuff = self.work_pixbuff.copy()
self.pixbuff = self.work_pixbuff.copy()
self.pixbuff.path = path
width = self.pixbuff.get_width()
height = self.pixbuff.get_height()
size = sizeof_fmt( getsize(path) )
@@ -124,4 +127,4 @@ class ImageView(ImageViewMixin, Gtk.Image):
w, h = im.size
return GdkPixbuf.Pixbuf.new_from_bytes(data, GdkPixbuf.Colorspace.RGB,
False, 8, w, h, w * 3)
False, 8, w, h, w * 3)