<commit_before># Sound & Images > Images

***

> Read our [Image API](http://www.stencyl.com/help/view/image-api) guide for an explanation of these blocks.

***

## Create Images

### Create Blank Image

![blank-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-create.png)

aaa

```
aaa
```

***

### Copy of Image

![copy-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-copy.png)

aaa

```
aaa
```

***

### Part of Image

![part-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-subimage.png)

aaa

```
aaa
```

***

### Resized Copy of Image

![resize-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-resize.png)

aaa

```
aaa
```

***

## From the Game

### Current Screen as Image

![screen-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-screen.png)

aaa

```
aaa
```

***

### Image from Actor

![actor-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-actor.png)

aaa

```
aaa
```

***

## From External Sources

### Image from File

![file-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-file.png)

aaa

```
aaa
```

***

### Load Image from URL

![url-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-url.png)

aaa

```
aaa
```

***

## Convert Image to/from Text

### Image to Text

![to-text-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-to-text.png)

aaa

```
aaa
```

***

### Text to Image

![from-text-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-from-text.png)

aaa

```
aaa
```

***<commit_msg>Update images.md<commit_after># Sound & Images > Images

***

> Read our [Image API](http://www.stencyl.com/help/view/image-api) guide for an explanation of these blocks.

***

## Create Images

### Create Blank Image

![blank-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-create.png)

aaa

```
new BitmapData([NUMBER] * Engine.SCALE, [NUMBER] * Engine.SCALE, true, 0)
```

***

### Copy of Image

![copy-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-copy.png)

aaa

```
[IMAGE].clone()
```

***

### Part of Image

![part-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-subimage.png)

aaa

```
getSubImage([IMAGE], [NUMBER], [NUMBER], [NUMBER], [NUMBER])
```

***

### Resized Copy of Image

![resize-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-resize.png)

aaa

```
//Smoothing
resizeImage([IMAGE], ([NUMBER]/100), ([NUMBER]/100), true)

//No Smoothing
resizeImage([IMAGE], ([NUMBER]/100), ([NUMBER]/100), false)
```

***

## From the Game

### Current Screen as Image

![screen-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-screen.png)

aaa

```
captureScreenshot()
```

***

### Image from Actor

![actor-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-actor.png)

aaa

```
getImageForActor([ACTOR])
```

***

## From External Sources

### Image from File

![file-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-file.png)

aaa

```
getExternalImage([TEXT])
```

***

### Load Image from URL

![url-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-url.png)

aaa

```
loadImageFromURL([TEXT], function(img:BitmapData):Void {
  [ACTIONS]
});
```

***

## Convert Image to/from Text

### Image to Text

![to-text-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-to-text.png)

aaa

```
imageToText([IMAGE])
```

***

### Text to Image

![from-text-image-block](http://static.stencyl.com/pedia2/block-images/6%20-%20Sound%20%20Images/1%20-%20Images/image-from-text.png)

aaa

```
imageFromText([TEXT])
```

***
{'fraction_non_alphanumeric': 0.22244805781391147, 'fraction_numerical': 0.07068654019873533, 'mean_word_length': 4.6709346991037135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5548679', 'n_tokens_mistral': 1965, 'n_tokens_neox': 1752, 'n_words': 203}