Skip to content

Commit 39e80f8

Browse files
committed
Fix example
1 parent 2a2568b commit 39e80f8

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

web/src/pages/reference/Pixels.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Setting pixels to a [render target](/reference/dxCreateRenderTarget) is **especi
3636

3737
## Examples
3838

39-
Pixels can also be loaded from any png/jpeg file just like this:
39+
Pixels can also be loaded from any *png/jpeg* file just like this:
4040

4141
```lua
4242
local fileHandler = fileOpen("hello.jpg")
@@ -54,10 +54,13 @@ fileClose(fileHandler)
5454
Pixels can be used to create textures just like this:
5555

5656
```lua
57-
local newTexture = dxCreateTexture(pixelsData)`/>
57+
local newTexture = dxCreateTexture(pixelsData)
58+
```
59+
60+
Pixels can be used to save textures just like this:
5861

59-
<p>Pixels can be used to save textures just like this:</p>
60-
<Code lang="lua" code=`local texturePixels = dxGetTexturePixels(myRenderTarget)
62+
```lua
63+
local texturePixels = dxGetTexturePixels(myRenderTarget)
6164
local texturePixelsConverted = dxConvertPixels(texturePixels, "jpeg")
6265
local fileHandler = fileCreate("piccy.jpg")
6366

0 commit comments

Comments
 (0)