---
title: Create and image and draw a line in Rust
timestamp: 2023-10-01T19:30:01
author: szabgab
published: true
description:
tags:
    - image
    - graphics
    - draw
---

In this example we continue the cration of simple images using the [image](https://crates.io/crates/image) Rust crate.

We started with an [empty image](/create-empty-image) and now with this code we created two small images and drew two lines:

![veritcal green line](examples/create-image-draw-line/green_vertical_line.png)

![horizontal red line](examples/create-image-draw-line/red_horizontal_line.png)

{% include file="examples/create-image-draw-line/src/main.rs" %}


