[Bug] Native Image Occlusion changes blank textbox sizes

Hello everyone,
two issues present themselves:
→ When creating a blank textbox (into which I put " " spaces), I can only resize it with by pulling the corners (changing the height AND the length), and not change only the length or the height. Once I press “D” to duplicate the occlusion, I get option to resize the length and/or the height of the textbox by pulling the sides. I would be surprised, if that is supposed to be the intended behavior.

After duplicating the textbox to be able to change the length or height:
→ When I try to hide the part of an image that I do not want to be occluded with the help of a blank text box and that I changed in length/height only (so pulling the sizes, not the corners to resize it), the text box resizes itself when creating the card as if it wants to match a certain font size.

Does anyone know, what could be the problem here? Is it not intended to use image occlusion like this?

Kind regards.

I was able to reproduce the two behaviors on the Mac Anki app.

I believe the intended behavior is that the text box is supposed to be able to be resized by the corners only. It is a bug is that duplicated text boxes incorrectly can be resized by their sides. The second behavior is just a side effect of the bug.

Looking at the code, it seems that the text box aspect ratio is intended to be fixed, so resizing width/height should not be allowed. There is code that removes the resizing handles from the sides. Newly-added text boxes remove the handles. Pre-existing text boxes remove the handles. I’m guessing that the duplicate functionality (the copy and paste operations) bypass the step where the side handles are removed.

2 Likes

Great! Thank you. Do I have to open a BugReport? If yes, where?

In addition, I would like to ask for such a feature, where it is possible to create boxes that hide parts of the image and that do not create a card, even better if it is possible to adjust their color and or border let’s call it a “correction box”.

Sometimes there is just too much information on an image, and simply occluding isn’t enough, and not occluding is not an option, because it gives hints for the other informations on the schema.

Sometimes, there is information, I would like to hide on the image, or that is not well represented (for example a supergroup of organs called another name that is badly put on the schema). For that, it would be ideal to be able to cover that name, and rewrite the name somwhere else so that one can modify the schema and adjust it to their way of thinking - for that, it woud also be neat for the text not to have a white background and to be able to change the text color.

If that is implemented with the arrow heads and drawing tools (to make lines) included, it would make for a complete and practical image occlusion tool, just like the add-on.

Right now, the stock image occlusion isn’t covering all the functionalities, and the user needed expanded functionalities either has to download a 4 year old add-on, or use an image editor like gimp.

(This isn’t a rant, it is a suggestion to make anki great - I would love to contribute, but can’t code)

1 Like

No, you don’t have to file a bug report. The Anki development team uses this forum as part of their bug reporting system, so having already posted the information in this forum topic should be enough.

In addition, I would like to ask for such a feature, where it is possible to create boxes that hide parts of the image and that do not create a card, even better if it is possible to adjust their color and or border let’s call it a “correction box”.

In my addition I introduced blue blocks to hide something. https://ankiweb.net/shared/info/675107747

Sometimes, there is information, I would like to hide on the image, or that is not well represented (for example a supergroup of organs called another name that is badly put on the schema). For that, it would be ideal to be able to cover that name, and rewrite the name somwhere else so that one can modify the schema and adjust it to their way of thinking - for that, it woud also be neat for the text not to have a white background and to be able to change the text color.

You need to change the original image and this should not be done in Anki. It’s assumed that everything in your image is correct; it’s some kind of training material, and simply because of its complexity, we need to break it down into sections, identify the hard-to-remember parts, and focus only on them.
For example, a world map. It contains a huge amount of information (maybe 1,000 or more), and there’s only one solution: create multiple different maps with different types of objects and teach them in sections and for different types.

(This isn’t a rant; it’s a suggestion to make Anki great - I would love to contribute, but I can’t code it)

There’s AI now, although I agree that programming is necessary. But it takes a lot of time, and AI won’t be completely helpful, since these are your ideas and it can’t test everything. You need to test it on a computer, with other add-ons, for example. Then there’s the online version, the offline version, how it was exported, the version for Ankidroid, and so on. Every added feature can impact something else already tested, so the number of checks grows exponentially with the program’s complexity.

In addition, I would like to ask for a feature where it’s possible to create boxes that hide parts of the image and that don’t create a card. Even better, if it’s possible to adjust their color and/or border, let’s call it a “correction box.”

I’m not an Anki developer, so unfortunately. But even if both the developers and I are writing to them about something other than my own (specifically, this is Ankidroid), and then this is the response three months later:
“I was pretty aggressively hounded over this issue, and that’s the last thing someone should do if they want it to be prioritized.”
“Due to this, it’s very low on the priority queue for me. I’ll reconsider if an established member of the community has an issue with it.”

So sometimes, you have to become a programmer. That’s how a lot of things were implemented in Anki. The only problem is the complexity of the code. What started out simple seemed like it wouldn’t take much time, but the further I went, the more code there was, and now there are over 2,000 lines of code in the card template alone. I think that’s not the limit, and I’m tempted to do more. Everything is created with a purpose, and often a person has one, while users have a different one. Even if a feature is incredibly useful, but the majority doesn’t understand its benefits and voted for it, that’s just how it will be.

I completely understand developers: when they’re under intense pressure to do something, and there’s no money to be made, they can’t devote their rare free time to it. After all, in addition to the work they often don’t have time to do, there are dozens of free programs, each of which can receive dozens of suggestions for redesigns or bug fixes. That’s hundreds or thousands of hours of corrections or changes (a year of daily work if you spend three hours a day on it, but that code will still generate suggestions for a couple more years, and so on, in arithmetic progression).

Please forgive me in advance for refusing to change anything in my add-ons. The code is free, and anyone can try to change something with AI. Everyone thinks AI can replace programmers, but in reality, the number of programs is only growing, and you need to be a highly skilled tester. I consider this even more valuable than a regular programmer, since you still have to figure out why a program behaves the way it does with that particular code.

The “Simple Image Occlusion” add-on is currently being finalized, but I keep changing it, and it drags on week after week. People don’t really like typing, even though that’s what I originally created the add-on for. So I had to make it fast-paced, and if editing is enabled, there’ll be a test of your spelling skills. I had to add a game feature: a random poll of all yellow rectangles and the challenge of reaching the automation speed—that’s what achieves excellent memorization. To add some meaning and interest, I added different emojis, and the ability to click a link if you reach the “very good” level. To make it suitable for display on a large screen (the cursor isn’t as visible in the classroom), I added the ability to display a pointer instead of a cursor. You’ve probably noticed that there’s not just one object to memorize, but 8-12—exactly the right number to create a game that tests recall speed. Of course, the add-on does the job of breaking it down into individual cards, but it’s more useful to organize class or group work by presenting everything at once and calling on each student one at a time, so they can randomly select one from about 10 similar tests and demonstrate what they’ve learned. Getting middle school students to use Anki is a big challenge, and infrequent use won’t be effective.
Read “Seven Years of Spaced Repetition Software in the Classroom” https://www.lesswrong.com/posts/F6ZTtBXn2cFLmWPdM/seven-years-of-spaced-repetition-software-in-the-classroom-1

This makes it more convenient for teachers to use other online resources where they can create tests. This add-on already has an option to export the entire card from the web interface into a single HTML file, which includes both the image and even the sound. So, the student only needs to download this file or open it from the website. That is, we don’t force them to use Anki, since the teacher creates such a test. However, this way, we can at least interest the teachers, and then the children, seeing the link “Created using the ‘Simple Image Occlusion’ add-on for Anki,” can open it and familiarize themselves with it.
The children are given ready-made tests, let’s say 10 of them, each with 10 objects, meaning 100 new knowledge items. They are given a week to prepare, and then a random quiz is administered to the entire class. If we don’t force the children, many won’t succeed, since most are lazy and why bother learning something when you can ask an AI?
Of course, knowledge will be forgotten if it’s not reviewed. This method often fails to select what’s difficult to remember. But the student can also export their HTML file to another one, covering the rectangles they don’t need, and then, when they open it again, they’ll see exactly the ones they need to pay attention to. So, this problem is partially solved, but it doesn’t solve the repetitions over time. But even the traditional curriculum doesn’t solve the problem of excessive repetition: you simply have to learn it all in a week, and there’s no time to repeat the same material (topics). Then, six months later, you have to take an exam, which, over the course of 16 weeks, already requires 1,600 items to memorize (just for one subject!), and these can be complex terms.

Okay, I decided to share my problems and thoughts here, but maybe someone will relate to this and at least give it a like.