[ImageResizer] Support for file URIs in clipboard
glutanimate opened this issue · 2 comments
Hi there,
I really love the idea behind ImageResizer. I use lots of images in my decks and some of them are way too large for their purpose. That's where ImageResizer would come in very handy for me.
Unfortunately it looks like Nautilus on Ubuntu does not support the clipboard image target. When I copy an image file these are the targets that are generated (as reported by xclip):
$ xclip -selection clipboard -t TARGETS -o
TIMESTAMP
TARGETS
MULTIPLE
x-special/gnome-copied-files
text/uri-list
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain
Right now, in order to use your add-on, I have to first open up the image in Ubuntu's default image viewer and then copy it from there.
As Anki supports copying images from Nautilus natively (probably by using the file URI target), I was wondering if maybe there was a chance you could implement this in ImageResizer, too. It would certainly be a huge improvement in my workflow if I could just copy the images from the file manager without having to launch an image viewer first.
FWIW, I am using Nautilus on Ubuntu 12.04. I figure more recent releases of Nautilus might have added the image target to copied files, but I am sure users of other desktop environments and simpler file managers could also stand to benefit from generic support for image URIs in the clipboard.
In any case, thanks a lot for putting this quality add-on together and thanks in particular for reading this feature request.
Cheers
Glutanimate
Hi Glutanimate,
Thank you for the suggestion. It's supported now, you can copy the image file and paste it in Anki, ImageResizer will resize it. Update the addon and try again.
I just gave the latest version a try and it's working perfectly! Thanks for implementing this straight away. I really appreciate it.