Image Occlusion Enhanced [Official thread]

Glutanimate's Avatar

Glutanimate

13 Oct, 2016 12:25 AM

This is the new official support thread for Image Occlusion Enhanced (old thread). From now on please direct all of your questions about the add-on here.

Thank you!

Showing page 4 out of 9. View the first page

  1. 91 Posted by SVG-image->impo... on 03 Apr, 2017 02:35 PM

    SVG-image->import from clipboard?'s Avatar

    Found from watching the tutorial how to do so (SVG-image->image import). However, it seems that cannot import a screenshot on clipboard, but must save it to disk. Is there a way to use clipboard image instead of screenshot to disk?

  2. 92 Posted by Glutanimate on 03 Apr, 2017 06:58 PM

    Glutanimate's Avatar

    Hi there,

    thanks for the kind words. Glad you're enjoying IO.

    I'll try to address each of your points separately:

    Image tool use

    I talk a bit about this in the last IO tutorial video (timecode: 5:25).

    The tool will only allow you to add a reference an external image file. This is more confusing than useful, I think, so I might actually remove this option entirely in the future.

    Composite images

    You can import additional images, as demonstrated in this video, but I'd highly recommend against it for the reasons stated in the video (the imported image being duplicated across each SVG mask).

    Image editing is very limited in the IO Editor in general, so I think your best bet for any advanced edits is to just pre-process your images in an external app first.

    SVG import via the clipboard

    No, I'm afraid. SVG-Edit only supports importing local files.

  3. 93 Posted by hummus on 09 Apr, 2017 12:04 AM

    hummus's Avatar

    ImageOcclusion doesn't work on Windows?
    Or is it just me?
    It seems such a useful add-on and I want to use it,
    but it doesn't work on my notebook as seen in the attached image.
    Help!

  4. 94 Posted by Glutanimate on 09 Apr, 2017 04:53 AM

    Glutanimate's Avatar

    @hummus:

    Does your Windows user name contain any non-latin characters by any chance? If so please see here: https://github.com/glutanimate/image-occlusion-enhanced/wiki/Troubl...

  5. 95 Posted by Glutanimate on 09 Apr, 2017 05:42 AM

    Glutanimate's Avatar

    @hummus:

    Actually, could you help me test something?

    Could you paste the following into the Debug Console and let me know what's printed in the result screen? (you will have to hit Ctrl/Cmd+Return after pasting the code):

    import image_occlusion_enhanced.main
    print image_occlusion_enhanced.main.svg_edit_path
    print type(image_occlusion_enhanced.main.svg_edit_path)
    

    The result will include your Windows username. Please feel free to send me an email instead if you're not comfortable sharing that here in public: ankiglutanimate [αt] gmail.com

  6. 96 Posted by Glutanimate on 17 Apr, 2017 07:06 AM

    Glutanimate's Avatar

    This comment was split into a new private discussion: Image Occlusion Enhanced [Official thread]

    Hey guys,

    I've just uploaded Image Occlusion Enhanced v1.2.2 to AnkiWeb. Here are the release notes:

    • Fixed: rare AttributeError when changing the image (thanks to Renita and Joshua for the report)
    • Fixed: GIFs should be supported on Windows and macOS now
    • Fixed: incompatibility with upcoming release of "Quick note and deck buttons" add-on (thanks to drroscoe for the reminder)

    A recent iOS-update might be affecting Image Occlusion 2.0 cards that were created earlier than 2015. If your occlusion masks are not drawn properly you can try to use this tool by mrestko to fix them. Please note that you will have to add or remove a file from your media collection after running this script for the changes to be synchronized to AnkiWeb. Thanks to frichter for reporting this and documenting his solution.

  7. 97 Posted by moritz on 18 Apr, 2017 09:57 AM

    moritz's Avatar

    Hi,
    I am a med student and your addon makes my life a lot easier. Thanks a lot!
    Is it possible to reverse the direction of the mask showing. For example that I have some kind of image or text that is at first not shown and then revealed without an overlay? Would be a great feature.
    BR, Moritz

  8. 98 Posted by Glutanimate on 19 Apr, 2017 02:38 PM

    Glutanimate's Avatar

    @Moritz:

    Glad to hear that! You also commented on YouTube, right? I can't think of any way to have canvas items appear on the back side of the card exclusively, at least with the current feature-set of the add-on. What exactly would you like to use this feature for? There might be a way to achieve this with the existing version of the add-on.

  9. 99 Posted by Brian Hurd on 11 May, 2017 07:01 AM

    Brian Hurd's Avatar

    This comment was split into a new discussion: Maintaining zoom position in AnkiMobile

    I feel like there is a solution out there I'm missing, but I've looked everywhere—
    On mobile (iOs but css solutions often work both places)...
    -
    Is there any way to maintain the zoom level between front and back??
    -
    EXAMPLE: I start an image card > pinch zoom while still only front is showing > tap show answer > answer image MAINTAINS zoom level and position
    -
    THANKS!!!

  10. 100 Posted by Sinae Jeong on 11 May, 2017 05:24 PM

    Sinae Jeong's Avatar

    2017. 5. 11. 오후 4:01 DiveShallow <[email blocked]> 작성:

  11. 101 Posted by Brian Hurd on 11 May, 2017 10:12 PM

    Brian Hurd's Avatar

    @Moritz
    If you insert text using the image occlusion occlusion editor (the text you want to disappear after flipping) > then insert a small arbitrary occlusion box anywhere in the editor > then click the first create button >>> what you'll get is two cards created. The one where the arbitrary box is active will show the text before flipping and after flipping the box will disappear. THEN , if you hit "toggle " button the text will disappear. I think that's what you're looking for. You will of course have a second card that was created.

  12. 102 Posted by moritz on 11 May, 2017 10:36 PM

    moritz's Avatar

    @Brian
    @Glutanimate

    Found a quite simple solution a while ago. I use a wacom intous paper device to write down my notes in class. Then use Image Occlusion to create the cards, followed by simple reversion using a custom note type.
    Result as shown in Video!

  13. 103 Posted by Glutanimate on 12 May, 2017 08:31 PM

    Glutanimate's Avatar

    @ Brian/DiveShallow:

    There might a way to maintain the zoom level / scroll position with JavaScript, but I think it would require the webview on iOS to support cookies/localstorage which I'm not sure it does. Either way, I'm afraid this is outside of the scope of the add-on for now, but if anyone finds a way to implement this so that it works across all platforms I wouldn't mind integrating it into the add-on (or at the very least adding it to the list of template tweaks on the wiki).

    @ Moritz:

    That's a clever workaround. Also: Your illustrations look great! Pretty much textbook-level. Kudos on that!

  14. 104 Posted by Glutanimate on 13 May, 2017 04:06 PM

    Glutanimate's Avatar

    Just a quick heads-up for everyone affected by the recent display issues on iOS with older IO 2.0 cards: I've just released a small add-on based on the repair script above that should help make the note conversion process easier. Please let me know if you run into any issues whatsoever.

  15. 105 Posted by Dick Scholtus on 24 May, 2017 05:33 PM

    Dick Scholtus's Avatar

    Hi Glutanimate:

    Would it be possible to add a function to generate (blank or invisible SVG) Image Occlusion cards based on a folder? This way I can first review my blank cards via Anki and then after viewing them a couple of times can generate the occlusion afterwards.

    With dear regards.

  16. 106 Posted by Brian Hurd on 24 May, 2017 10:18 PM

    Brian Hurd's Avatar

    You could just put a small rectangle in the bottom corner of a card as a
    "mock" occlusion to get the desired result. Like this:
    https://i.imgur.com/tsX4tvD.png

  17. 107 Posted by Dick Scholtus on 24 May, 2017 11:04 PM

    Dick Scholtus's Avatar

    Hi Brian,

    Yea I know that was why I referenced ‘based on a folder’.
    I would love to be able to do this in mass for a whole set of cards by selecting a folder full of .png files.

  18. 108 Posted by moritz on 25 May, 2017 06:22 AM

    moritz's Avatar

    @Dick Scholtus

    I believe you can do it by using an automation software, that repeats your standardized process (some kind of macro recorder program). Just mind that it is still quite time consuming, but a least you don't have to be physically at your pc. That's at least how I am doing it.

  19. 109 Posted by Dick Scholtus on 25 May, 2017 07:30 AM

    Dick Scholtus's Avatar

    You’re right that’s also a solution, thanks!

    Unfortunately some of my cards are in different sizes and so if I created a macro it would still go wrong. I’m hoping glutanimate, who was working on it the last time has a solution. I think we can all agree that he is a pretty brilliant coder so I’m hoping he will read this (;

  20. 110 Posted by Glutanimate on 25 May, 2017 04:30 PM

    Glutanimate's Avatar

    @ Dick Scholtus:

    Thanks for the kind words.

    Batch-editing/-creation capabilities would be nice to have, but because of a lack of time this is not something I'm willing to tackle anytime soon, I'm afraid.

    However, the next version of IO will feature the ability to reuse images from existing Anki notes, regardless of their note type. Coupled with the Media Import add-on that should allow you to create a batch of basic notes, review them a few times, and then later create IO notes based off of them.

  21. 111 Posted by Dick Scholtus on 25 May, 2017 07:56 PM

    Dick Scholtus's Avatar

    As far as i’m concerned the conversion of basic notes to IO notes would solve my problem.
    And by all means do whatever you think is necessary. I think the anki community is already extremely grateful to you.

  22. 112 Posted by Renita Whittle on 25 May, 2017 11:51 PM

    Renita Whittle's Avatar

    Sent from my iPhone

  23. 113 Posted by Brian Hurd on 26 May, 2017 12:52 AM

    Brian Hurd's Avatar

    In the meantime, if I had like 1,000 images I wanted to make into cards.
    What I would do is:
    -
    ▪ Install http://www.bricelam.net/ImageResizer/ so you can batch adjust
    images to uniform max height.
    -
    Then either:
    A) batch convert the images to PDF and use program "greenshot" to take
    screenshots from there. Alternatively use snapshot tool in pdf program
    with preference set to ~150 resolution.
    -OR-
    B) ▪ Use xyplorer to copy an image directly to the clipboard from the file
    explorer. You can assign a shortcut here in xyplorer:
    https://i.imgur.com/RyIxzhS.png
    ▪ Then write an autohotkey loop to automate the process. Simply sending
    the copy to clipboard key combination in xyplorer, switch to card creation
    and create occlusion, switch back to xyplorer, repeat.

  24. 114 Posted by Marie on 27 May, 2017 11:40 AM

    Marie 's Avatar

    Hi.
    I was wondering if there is any way to change the short cut to this add on or turn it off altogether? Currently it is Alt-A and Alt-O which I also use to make the danish letters å and ø, so whenever I wanna use these letters instead it opens up image occlusion.
    Copy-pasting the letters is a bit tiresome as they are used quite a lot in the danish language so a solution would be much obliged.
    Thank you.

  25. 115 Posted by Dick Scholtus on 27 May, 2017 11:54 AM

    Dick Scholtus's Avatar

    I think your best solution would be to change the shortcut in the addons itself.
    In your addons folder in the folder Image Occlusion Enhanced, there is an addons named main.py
    On line 346 the following code you should change the parameters for which shortcut you want.

    def onSetupEditorButtons(self):
        """Add IO button to Editor"""
        if isinstance(self.parentWindow, AddCards):
            btn = self._addButton("new_occlusion",
                    lambda o=self: onImgOccButton(self, "add"),
                    _("Alt+a"), _("Add Image Occlusion (Alt+A/Alt+O)"),
                    canDisable=False)
        elif isinstance(self.parentWindow, EditCurrent):
            btn = self._addButton("edit_occlusion",
                    lambda o=self: onImgOccButton(self, "editcurrent"),
                    _("Alt+a"), _("Edit Image Occlusion (Alt+A/Alt+O)"),
                    canDisable=False)
        else:
            btn = self._addButton("edit_occlusion",
                    lambda o=self: onImgOccButton(self, "browser"),
                    _("Alt+a"), _("Edit Image Occlusion (Alt+A/Alt+O)"),
                    canDisable=False)

       # secondary hotkey:
        press_action = QAction(self.parentWindow, triggered=btn.animateClick)
        press_action.setShortcut(QKeySequence(_("Alt+o")))
        btn.addAction(press_action)

  26. 116 Posted by Marie Celina Hø... on 27 May, 2017 12:54 PM

    Marie Celina Høj's Avatar

    Hi Dick.
    Thank you very much for your reply. I have tried changing it to “k" and “l", then to “[" and “]", but it doesn’t seem to work.
    I am by no way a developer and it appears I am doing something wrong as I am getting some kind of an error message mentioning the lines I have changed when I open up anki. Even when I change it back to the original it is somehow wrong and I have to un-install and re-install it again.
    Can you help me change it to the keys k and l?
    On 27 May 2017, at 13.55, Dick Scholtus <[email blocked]<mailto:[email blocked]>> wrote:

  27. 117 Posted by Glutanimate on 27 May, 2017 05:32 PM

    Glutanimate's Avatar

    @Dick Scholtus:

    Thanks for chiming in!

    @Marie:

    The syntax can be rather tricky. Just one missing indentation or quote will trip the code up. Here, please give the following a try:

    def onSetupEditorButtons(self): 
        """Add IO button to Editor""" 
        if isinstance(self.parentWindow, AddCards): 
            btn = self._addButton("new_occlusion", 
                    lambda o=self: onImgOccButton(self, "add"), 
                    _("Alt+k"), _("Add Image Occlusion (Alt+k/Alt+i)"), 
                    canDisable=False) 
        elif isinstance(self.parentWindow, EditCurrent): 
            btn = self._addButton("edit_occlusion", 
                    lambda o=self: onImgOccButton(self, "editcurrent"), 
                    _("Alt+k"), _("Edit Image Occlusion (Alt+k/Alt+i)"), 
                    canDisable=False) 
        else: 
            btn = self._addButton("edit_occlusion", 
                    lambda o=self: onImgOccButton(self, "browser"), 
                    _("Alt+k"), _("Edit Image Occlusion (Alt+k/Alt+i)"), 
                    canDisable=False)
    
        # secondary hotkey: 
        press_action = QAction(self.parentWindow, triggered=btn.animateClick) 
        press_action.setShortcut(QKeySequence(_("Alt+i"))) 
        btn.addAction(press_action)
    

    Another thing: The regular Notepad app doesn't handle code all that well (inserting the wrong type of linebreak, etc.). If you're still experiencing issues after applying the code above you could give Notepad++ a try.

    As this seems to be a more common issue than I thought I will likely change the default key bindings in the next add-on release. If I find the time I might also add a configuration option to define a custom key binding from the options menu.

  28. 118 Posted by Elizabeth on 01 Jul, 2017 01:25 PM

    Elizabeth's Avatar

    Hi
    I am having problems with the add on. I follow all the instructions of videos ect and I select an option like hide all reveal one. A little announcement tell me that cards are added but when I go to the deck nothing was added. Solutions please??

  29. 119 Posted by Neel on 01 Jul, 2017 07:54 PM

    Neel's Avatar

    Does not work with handy answer key shortcut addon "2090822731", please help.

  30. 120 Posted by Glutanimate on 02 Jul, 2017 01:22 PM

    Glutanimate's Avatar

    @Elizabeth:

    Try adding a few more cards, then head into the card browser and click on "Added Today" in the left sidebar. Do the cards appear there? If they do, then the add-on is either adding your notes to a different deck or adding them to a deck that has a new card limit.

    Please see here for more information:

    https://anki.tenderapp.com/kb/problems/ankis-not-showing-me-all-my-...

    https://github.com/Glutanimate/image-occlusion-enhanced/wiki/Troubl...

    @Neel:

    Which part of the add-on doesn't work?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac