Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible insert image to a code comment?

Tags:

comments

c#

ide

My question is probably an insane idea, however, it's very valuable when I write code for educational purpose.

Especially when the code is relevant to math and physics, images inserted in comment are more convenient and articulated.

Until now, I can't find a way succeed to insert a true image into comment, not C# nor python or any other common programming language or IDE.

Using tools that convert images to ASCII image is a workaround but less precise.

Any idea is appreciated

like image 771
Alex Chen Avatar asked Aug 24 '11 05:08

Alex Chen


People also ask

How do you put a picture in a comment?

Click Comment on your news feed beneath the post you want to respond to. Enter any text, if you want, and then click the camera icon at the right side of the text box. Choose the image or video you want to add to the comment. Submit the comment like you would any other.

Is it possible to code an image?

Yes you can. Count a week of work for a 32 by 32 image, just using paper and pencil (including digestion of the math). The easiest format is indeed the (ASCII-encoded) PPM, which you can write straight away (assuming you know the RGB values).


2 Answers

There is an example here that extend the Visual Studio 2010 editor: Image Insertion (but it's tied to Visual Studio, not a generic solution)

like image 174
Simon Mourier Avatar answered Sep 22 '22 23:09

Simon Mourier


For Python you can use Google Colab. Inside a text-block you can write something like:

![Alt text](https://someurl.com/image.png). 

Example: enter image description here

For C# you can try this plug-in:

https://marketplace.visualstudio.com/items?itemName=MsBishop.ImageComments

like image 42
asaf92 Avatar answered Sep 18 '22 23:09

asaf92