Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make link editor background transparent #125

Open
Alizter opened this issue Jan 5, 2025 · 4 comments
Open

Make link editor background transparent #125

Alizter opened this issue Jan 5, 2025 · 4 comments

Comments

@Alizter
Copy link

Alizter commented Jan 5, 2025

It would be nice if we could configure the link editor to have a transparent background. That would allow people to put the editor over a picture and trace a knot. Alternatively, being able to import pictures would be nice too.

@culler
Copy link
Member

culler commented Jan 5, 2025

That seems like a good idea to me. I think a transparent background for a Tk Canvas might be challenging, but I will look into it. Allowing a background image, say from a pdf file, should be relatively easy, however.

@NathanDunfield
Copy link
Member

@Alizter: You might be interested in KnotFolio can take an image of a knot (including from a photo) and convert into a diagram that SnapPy will accept. I haven't used it enough to know how complicated an diagram it can handle.

@culler: I agree this would be a nice addition. I think Tk can only display gif and pmg/ppm files on its own, for png and jpeg one needs to use PIL as well to display them. Converting from pdf to a bitmapped format probably requires outside converters (e.g. imagemagick).

@culler
Copy link
Member

culler commented Jan 5, 2025

@NathanDunfield You are right, of course. Pdf would be problematic. The most likely format would probably be jpeg, since people will probably take a picture of the knot with their phone. But then we would have to deal with new iphones, which will produce HEIC images. Those are a real pain. But Pillow can deal with them if you add a special plugin.

@Alizter
Copy link
Author

Alizter commented Jan 7, 2025

@Alizter: You might be interested in KnotFolio can take an image of a knot (including from a photo) and convert into a diagram that SnapPy will accept. I haven't used it enough to know how complicated an diagram it can handle.

Thanks. This is not quite as sophisticated as I had hoped however. But I suppose its good if you have a pen drawing of a knot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants