Image occlusion misbehaving

I’m not sure what I can do?

Deleting the wrong-image file has this result, which is sorta good enough I guess, though it’s strange. It seems like it wants to show the wrong-image superimposed on top of the right-image.

Can you share one of those cards maybe (as an .apkg)? Surely what you’re seeing should be solvable.

I just looked manually in collection.anki2 with sqlite3 and the flds column looks like this

{{c2::image-occlusion:rect:left=.7006:top=.3759:width=.2846:height=.0682}}<br>{{c2::image-occlusion:rect:left=.0069:top=.4421:width=.6777:height=.0565}}<br>{{c1::image-occlusion:rect:left=.0069:top=.3759:width=.4469:height=.0604}}<br>{{c1::image-occlusion:rect:left=.008:top=.6582:width=.976:height=.2804}}<br>{{c1::image-occlusion:rect:left=.0029:top=.1429:width=.9725:height=.2208}}<br><img src="paste-11716670783489.jpg"><div><img src="paste-11729555685377 (1).jpg"></div>

where the second-listed jpg is the wrong one. I guess I can just edit it in the db, though ideally there’s a way to do it in app.

That seems fair, because I’m not sure that sentence made any sense! :sweat_smile: Sorry about that!

I think I was trying to say – if you can correct what’s there, like by deleting/replacing the image in the IO interface, you should try that. But built-in IO doesn’t have a replace-the-image action like add-on IO does, so I’m not sure that’s possible without “resetting” the note. After that, you’d have to redraw the occlusions, but if you drew them in the same order, then theoretically that would preserve any review history you have.

I took a look at that note [through support access to AnkiWeb] – and when I opened it in the editor/Browse, it actually flashes a copy of the wrong-image first, before showing the right-image. So I’m not surprised that deleting the image is giving you a broken image icon.

I never suggest that anyone edit their db, because the idea terrifies me. But I don’t think there is a way to edit that text in the app, because it shouldn’t be possible to get 2 images in there in the first place. If you feel confident you can edit it in the db and make it look like the normal notes do, it’s worth a shot! [But edit it in a copy of the db first and see if it works!]

1 Like

I thought of another workaround. I can copy the right-image into the wrong-image’s filename. That works.

Thanks for your help, that was all useful.

2 Likes

Oh, brilliant! Cheers!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.