• Docker Tutorial
  • Docker Useful Resources

When we make a simple program, the background is always black. How we insert an image or picture as a background? Or just change the background color? A popular programming and development blog. Here you can learn C, C, Java, Python, Android Development, PHP, SQL, JavaScript,.Net, etc. Importsource imports data from source, returning a Wolfram Language representation of it. Importsource, ' format' takes the file to be in the specified format. Importsource, elements imports the specified elements from a file. Importsource., options uses the specified options. Friends subscribe our channel about this video:-IN this video i try to show you guys how to insert image in graphics c/c. Its like a littl. Go to menu Image New Device Image, or right-click in the Image Editor pane and choose New Device Image. Select the type of image you want to add. You can also select Custom to create an icon whose size isn't available in the default list. To copy a device image. Go to menu Image Open Device Image and choose an image from the current images.

  • Selected Reading

In Docker, everything is based on Images. An image is a combination of a file system and parameters. Let’s take an example of the following command in Docker.

  • The Docker command is specific and tells the Docker program on the Operating System that something needs to be done.

  • The run command is used to mention that we want to create an instance of an image, which is then called a container.

  • Finally, 'hello-world' represents the image from which the container is made.

Now let’s look at how we can use the CentOS image available in Docker Hub to run CentOS on our Ubuntu machine. We can do this by executing the following command on our Ubuntu machine −

How To Import Image In Dev C%2b%2b

Note the following points about the above sudo command −

  • We are using the sudo command to ensure that it runs with root access.

  • Here, centos is the name of the image we want to download from Docker Hub and install on our Ubuntu machine.

  • ─it is used to mention that we want to run in interactive mode.

  • /bin/bash is used to run the bash shell once CentOS is up and running.

Displaying Docker Images

To see the list of Docker images on the system, you can issue the following command.

This command is used to display all the images currently installed on the system.

Syntax

Options

None

Return Value

The output will provide the list of images on the system.

Example

Output

When we run the above command, it will produce the following result −

From the above output, you can see that the server has three images: centos, newcentos, and jenkins. Each image has the following attributes −

  • TAG − This is used to logically tag images.

  • Image ID − This is used to uniquely identify the image.

  • Created − The number of days since the image was created.

  • Virtual Size − The size of the image.

Downloading Docker Images

Images can be downloaded from Docker Hub using the Docker run command. Let’s see in detail how we can do this.

Syntax

The following syntax is used to run a command in a Docker container.

Options

Return Value

The output will run the command in the desired container.

Example

This command will download the centos image, if it is not already present, and run the OS as a container.

Output

When we run the above command, we will get the following result −

You will now see the CentOS Docker image downloaded. Now, if we run the Docker images command to see the list of images on the system, we should be able to see the centos image as well.

Removing Docker Images

The Docker images on the system can be removed via the docker rmi command. Let’s look at this command in more detail.

This command is used to remove Docker images.

Syntax

Options

  • ImageID − This is the ID of the image which needs to be removed.

Return Value

The output will provide the Image ID of the deleted Image.

Example

Here, 7a86f8ffcb25 is the Image ID of the newcentos image.

Output

When we run the above command, it will produce the following result −

Let’s see some more Docker commands on images.

docker images -q

How To Import Image In Dev C 2b 2b 4

This command is used to return only the Image ID’s of the images.

Syntax

Options

  • q − It tells the Docker command to return the Image ID’s only.

Return Value

How To Import Image In Dev C 2b 2b C

The output will show only the Image ID’s of the images on the Docker host.

Example

Output

When we run the above command, it will produce the following result −

docker inspect

This command is used see the details of an image or container.

Syntax

Options

  • Repository − This is the name of the Image.

Return Value

The output will show detailed information on the Image.

Example

How To Import Image In Dev C 2b 2b 1b

Output

When we run the above command, it will produce the following result −

Introduction
So far we have been using C language for simple console output only. Most of us are unaware that using C++, low level graphics program can also be made. This means we can incorporate shapes,colors and designer fonts in our program. This article deals with the steps to enable the DevC++ compiler to generate graphics .
Configuring DevC++

  • Step 1: Download the DevC++ version 5.11 from here.
  • Step 2: Download the Graphics header files, and etc stuff needed from the given dropbox link.
  • Step 3: Extract the contents of the rar file.
  • Step 4: Go to the location where DevC++ is installed. For me its D drive. Go inside the MinGW64 folder. Copy the graphics.h and winbgim.h in the include folder and D:Dev-CppMinGW64x86_64-w64-mingw32include folder.
  • Step 5:Copy the libbgi.a file into lib folder and in D:Dev-CppMinGW64x86_64-w64-mingw32lib folder.
  • Step 6: Copy the ConsoleAppGraphics.template, ConsoleApp_cpp_graph.txt files and paste them inside the template folder of the devc++ installer location.

Now we are done with configuring of the DevC++ to support graphics programming. We shall write our very first graphics program now.
Running the first graphics program

  1. Open DevC++. Click file ->New ->Project.
  2. Make sure you get the Console Graphics option. However, we are not going to click on it.
  3. Choose Empty Project option and Give a project name and make sure the selected language is C++.
  4. Copy the following code to the editor window.
  5. Go to “Project” menu and choose “Project Options” (or just press ALT+P).
  6. Go to the “Parameters” tab In the “Linker” field, enter the following text:
    -lbgi
    -lgdi32
    -lcomdlg32
    -luuid
    -loleaut32
    -lole32
  7. Click OK and Compile and run the project and you’ll get this output:

Program Explanation

  • The initgraph function- ?Initializes the graphics system.
  • In C Program execution starts with main() similarly Graphics Environment Starts with this function.
  • initgraph() initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then putting the system into graphics mode

This article is contributed by Mudit Maheshwari. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to [email protected] See your article appearing on the GeeksforGeeks main page and help other Geeks.

How To Import Image In Dev C 2b 2b 1

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Recommended Posts: