Coder Social home page Coder Social logo

Image object with colored PNGs about pebblejs HOT 9 CLOSED

pebble avatar pebble commented on July 23, 2024
Image object with colored PNGs

from pebblejs.

Comments (9)

matism avatar matism commented on July 23, 2024

Hi there,

you can use different images for aplite and basalt by simply appending bw / color to your filenames. So if you have one image with the name example you need to create examplebw.png and examplecolor.png. Within the appinfo.json you only need to add example.png once because the app will automatically use the correct image.

      {
        "type": "png",
        "name": "IMAGE_EXAMPLE",
        "file": "images/example.png"
      },

Hope that helps,
Mathias

from pebblejs.

Meiguro avatar Meiguro commented on July 23, 2024

@matism Thanks for replying! This is a helpful tip I should add to the README.md. @kinncj is referring to colored remote images that are loaded from the internet which I've demoed yesterday at the Toronto meetup but will be pushing up hopefully before the weekend.

from pebblejs.

matism avatar matism commented on July 23, 2024

@Meiguro Ah I see, wasn't clear to me so I thought that might help.

from pebblejs.

kinncj avatar kinncj commented on July 23, 2024

@matism, sorry for not being clear.
I figured that local and remote resources can use the same Image object, but the Image::load() method forces the Image to be grayscale.

Thanks.

from pebblejs.

matism avatar matism commented on July 23, 2024

@kinncj Now everything is clear to me - thanks for the explanation!

from pebblejs.

Meiguro avatar Meiguro commented on July 23, 2024

@kinncj The changes have been pushed! I recommend testing on a real watch. There seems to be a strange app message issue when used in the emulator that I haven't finished investigating, though it eventually still works. If using the emulator, continually press buttons until an image shows up. I plan to add a progress spinner for loading images later, though the progress spinner wouldn't solve the problem with the emulator.

from pebblejs.

kinncj avatar kinncj commented on July 23, 2024

@Meiguro it worked like a charm.
Is cloud pebble using master? I did not have a chance to test on CloudPebble yet, just locally.

from pebblejs.

kinncj avatar kinncj commented on July 23, 2024

@Meiguro I guess we can close this?

from pebblejs.

Meiguro avatar Meiguro commented on July 23, 2024

Yes, thanks for the reminder!

from pebblejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.