Image Occlusion Enhanced [Official Support Thread]

I have tried that too :frowning:

Does that happen for all images, or just that one in specific?

As an alternative to Image Occlusion Enhanced, make sure you are using the latest version of Anki (23.10+) and use the image occlusion note type integrated to Anki (Tools > Manage Note Type > Add: Image Occlusion)
Docs

There are features missing, but should work as intended

It happens to all images, and I have been using the standard image occlusion to compensate. However, it is missing a lot of the features that I use from the add-on and I was hoping there would be a solution for this. I also have the latest version of Anki as I tried deleting/redownlaoding the app

Try disabling others add-ons and only enable image occlusion on, and restart your notebook

Don’t have any other solution unfortunately

It still doesn’t work :(. Thank you for trying though

Why can’t you resize the window though? Either on the zoomed-in view, by sliding the top edge down, and then dragging the whole window up –

image

– or in the multiple window view by sliding the bottom edge up. Yes, my screenshot is from Windows, but I’d be surprised if MacOS doesn’t allow the resizing of windows in a similar fashion.

Or can you snap the window into some sort of grid so that it resizes? I’ll be again surprised if you tell me that Windows can do this – by dragging or by keyboard shortcuts – but MacOS can’t.
image

1 Like

OMG!! I got it! The mac does allow me to resize other windows, just not the IO one for some reason. And Ik what you mean by just dragging and snapping the window to a grid (I just switched from a windows laptop). I fixed it by manually snapping the IO window to the left side of the screen. However, if I exit out of the grid then it goes back to being broken. But at least now I can use IO as normal. Thank you!

Once it’s in the grid, try resizing it again by dragging the edge, either vertically or horizontally. Sometime that’s enough to reset the current dimensions of the window (again, in Windows – but it seems worth a shot).

I don’t think Anki or IO Enhance are doing anything to lock the size of that window. It’s got a minimum size, but it’s much smaller than what you’re at, so that’s not the issue. You might want to look into what in MacOS is preventing resizing.

The moment I change the dimensions it exits out of the grid and goes back to being broken. But I will look into what is preventing mac from resizing windows

I’m using Image Occlusion to put lots of cards at once to a long image like in a website, but every time i review it just shows up at the top, let me make an example, say in long websites like w3school i take long scrolling screenshot of the article, and put rectangles on each part i want to create a flash cards, if i reach the bottom of the article and create all flash cards once i review it, it starts at the top instead of jumping right to the position where the card is located, how do i make anki jump to it, especially on iOS?

Are you using the add-on? Maybe you can ask in the support thread. Image Occlusion Enhanced [Official Support Thread]

Well, I think you might be better off taking one screenshot for each part of the page though. Any reason not doing that?

I’ve modified the code a bit so that it works correctly on the latest Anki and also on Ankimobile.

/** Auto-scroll for Image Occlusion Enhanced
* @author Matthias Metelka <github.com/kleinerpirat>
* modified by Foxy_null <github.com/foxy-null>
*/
(async function () {
  const img = document.querySelector("#io-overlay>img");
  const file = await fetch(img.src);
  const mask = new DOMParser()
    .parseFromString(await file.text(), "image/svg+xml")
    .querySelector("svg");
  const svgWidth = mask.getAttribute("width") || img.clientWidth;
  const svgHeight = mask.getAttribute("height") || img.clientHeight;

  mask.setAttribute("viewBox", `0 0 ${svgWidth} ${svgHeight}`);
  mask.style.cssText = `position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%;`;
  img.parentNode.insertBefore(mask, img);
  const targetElement = mask.querySelector("rect.qshape");
  const rect = targetElement.getBoundingClientRect();
  const xCenter = (rect.left + rect.right) / 2;
  const yCenter = (rect.top + rect.bottom) / 2;
  
  window.scrollTo({
    top: window.scrollY + yCenter - window.innerHeight / 2,
    left: window.scrollX + xCenter - window.innerWidth / 2,
    behavior: "smooth",
  });
  mask.remove();
})();

And you’re still free to use or modify it for your add-on, as @kleinerpirat said! :+1:

1 Like

Hi there,

I was trying to figure out if it is possible to replace the base picture in IO cards while keeping the same cards with their review history.

I am currently trying to unify and enhance my anatomy cards, mainly by replacing bad quality screenshots from lecture slides with better pics out of an anatomy atlas. It would be awesome to be able to exchange the picture, adjust the occlusion masks for the new location of the same structures and therefore have better quality cards without having to start over reviewing them. I couldn’t figure out a way to make it work properly, which is why I am asking here now.
Thanks in advance!

Mo

1 Like

[quote=“glutanimate, post:2, topic:924”]

Problem description

Each time I change some image occlusion cards from the Edit Image occlusion icon, the preview on the browser stop working and I need to force stop and restart anki to be able to continue changing my image occlusion cards from the browser

Checklist

Please replace the space inside the brackets with an x if the following items apply:

x* I’ve restarted Anki to see if it helps
x* I’ve verified that I use the latest version of the add-on by redownloading it from AnkiWeb
x* I’ve verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
x* I’ve tried to disable other add-ons to see if there are any interactions present

  • My issue disappears when I hold shift while starting Anki. ? If I restart it works but I don’t have time to restart everytime
    x* I’ve checked if anyone else reported this problem before by looking through the issue reports. I also checked to see if there is a section about known issues in the add-on description, documentation, or README.

Information about your Anki set-up

Please open Anki, go to Help → About, click on “Copy Debug Info”, and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):

Anki 25.02 (038d85b1)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.26100

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Advanced Review Bottom Bar ['1136455830', 2024-08-22T13:04, 'None', '']
Image Occlusion Enhanced ['1374772155', 2022-04-09T09:15, 'None', '']

===IDs of active AnkiWeb add-ons===
1136455830 1374772155

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Advanced Browser ['874215009', 2024-10-27T15:20, 'None', '']
Anki Simulator ['817108664', 2023-11-06T18:26, 'None', '']
BetterSearch ['1052724801', 2024-03-06T17:25, 'None', '']
Clickable Tags v20 ['1739176371', 2022-01-30T23:58, 'None', '']
Create Filtered Deck from the Browser ['861263371', 2017-08-29T20:57, 'None', '']
Custom Background Image and Gear Icon ['1210908941', 2025-01-29T09:31, 'None', mod]
Customize Keyboard Shortcuts ['24411424', 2023-11-01T10:17, 'None', mod]
Extended Tag AddEdit Dialog ['1135507717', 2023-11-11T17:58, 'None', '']
Filtered deck from browser selection - study review cards in browser order ['127393092', 2023-03-19T19:02, 'None', '']
Full Screen Toggle ['1612375712', 2018-08-25T04:21, 'None', '']
Legacy ReMemorize ['323586997', 2020-11-20T06:27, 'None', '']
Preview Slideshow ['90397199', 2021-08-06T09:42, 'None', mod]
Review Heatmap ['1771074083', 2022-06-30T03:43, 'None', '']
Speed Focus Mode auto-alert auto-reveal auto-answer ['1046608507', 2022-12-16T12:24, 'None', '']
True Retention ['613684242', 2017-11-19T21:43, 'None', '']
Zoom for Anki24 - Keep zoom level after reboot Fixed by Shige ['1923741581', 2025-01-08T16:23, 'None', mod]

Error message (if any)

If you’ve received an error message, please copy and paste it between the backticks below:
no message, just the preview does not show my cards anymore. see sreenshot


before changing image or after force restart anki:

i’ve been having an error for some time where the occlusion box doesn’t appear at all. I just now realised it’s because image occlusion enhamced was interfering with another add on “clickable tags”. i’m posting this in case anyone else is having the same problem to save them some time and effort.

2 Likes