Before you say this has been asked before, I did try to look this up and found these thread:
Compile a LaTeX document into a PNG image that's as short as possible
The issue is that I couldn't get the answers to work, probably because I'm not experienced enough. I tried to use the standalone class by writing
\documentclass[convert]{standalone}
but it gives me an error "Class standalone Warning: Conversion failed! Please ensure that shell escape is enabled (e.g. use '-shell-escape')."
Now, I have no idea how to use this -shell-escape function.
I'm using the software TeXworks and tried implementing the following solution:
How to enable shell-escape in TeXworks?
But this again just gives me the same error.
Any help is greatly appreciated!
@MadyYuvi:

pdflatex --shell-escape yourfile.tex– David Carlisle Jul 18 '19 at 12:44OSyou are using, i.e., Windows or Mac? – MadyYuvi Jul 18 '19 at 13:21cmd, then the MS-DOS prompt will open by auto, from there, you go to your working path and then try as per DavidCarlisle suggestion... – MadyYuvi Jul 18 '19 at 13:23how to map shortcut to run PDFLaTeX in TeXworks, I am not an expert inTeXworks, I am usingepsilonas my text editor, some expert inTeXworksmay reply for this...sorry... – MadyYuvi Jul 18 '19 at 13:32.pngfile into the same folder where you keepTeXapplication file or else you can keep the image file into a separate folder, and you can map that particular path by using the tags\usepackage{graphicx}\graphicspath{{./figure/}– MadyYuvi Jul 18 '19 at 13:37D:orE:, etc... – MadyYuvi Jul 18 '19 at 13:55testinC:and place all the files in that folder, then try... – MadyYuvi Jul 18 '19 at 13:59