KelvinS
KelvinS

Reputation: 3071

Loading PNG files on Pebble

I am trying to display a simple PNG image on Pebble smartwatch but it is not working on the device.

Code:

var UI = require('ui');
var Vector2 = require('vector2');

var wind = new UI.Window({ status: false, backgroundColor: 'white' });

var backgroundImage =  new UI.Image({
    image: 'images/5.png',
    size: new Vector2(144, 168),
    position: new Vector2(0, 0)
});

wind.add(backgroundImage);
wind.show();

Running the app on emulator everything works fine, but when I run it on Pebble the image is not displayed.

I'm doing it in Javascript on cloudpebble.net.

Upvotes: 0

Views: 82

Answers (0)

Related Questions