# Im JavaScript ein Image Objekt variabler Größe erzeugen

**URL:** <https://forum.calliope.cc/t/im-javascript-ein-image-objekt-variabler-groesse-erzeugen/2858>\
**Category:** Fragen zu MakeCode/PXT\
**Created:** [4. April 2024 um 21:01 UTC](https://forum.calliope.cc/t/im-javascript-ein-image-objekt-variabler-groesse-erzeugen/2858 "2024-04-04T21:01:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp.net](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.calliope.cc/asp.net/32/2780_2.png) [@asp.net](https://forum.calliope.cc/u/asp.net)\
**Post date:** [4. April 2024 um 21:01 UTC](https://forum.calliope.cc/t/im-javascript-ein-image-objekt-variabler-groesse-erzeugen/2858/1 "2024-04-04T21:01:32Z")

</div>

Kann mir jemand sagen, wie ich im Code ein Image-Objekt mit variabler Breite und Höhe erzeugen kann? So funktioniert es:

```auto
        let i5x8: Image

        i5x8 = matrix5x8(`
            . . . . .
            . . . . .
            . . . . .
            . . . . .
            . . . . .
            . . . . .
            . . . . .
            . . . . .
            `)

```

Ich möchte aber keine konstante Größe mit so einen String-Parameter, sondern beliebig große Images mit x und y erzeugen.

Diese Funktion fehlt mir noch für die Matrix **calliope-net/matrix** :

[matrix | Calliope I²C Erweiterung für OLED Displays 128x128 und 128x64 Pixel. Linien, Kreise, Text und eigene Bilder pixelgenau positionieren. Auch als Animation. Analoge Uhr. Zwei Displays gleichzeitig.](https://calliope-net.github.io/matrix/)
