Git Product home page Git Product logo

Comments (3)

lurch avatar lurch commented on June 16, 2024

Duplicate of #16 ?

from pico-playground.

TheLegendOfKitty avatar TheLegendOfKitty commented on June 16, 2024

Seems like OP fixed it, but didn't provide much detail on how. I tried the script he mentioned and did not have any luck.

from pico-playground.

zachlindsey avatar zachlindsey commented on June 16, 2024

Just in case anyone else finds this, here are some tips if you want to use the packfiles script:

  1. Make sure your image is the right size. For sprite_demo, make it 128x128 OR edit the berry[i].log_size = 7 line to be whatever power of 2 you want your images to be.
  2. If your image has transparency, use python packtiles.py -sdmf bgar5515 INPUT.png OUTPUT.h. Note the .h on the output. The flags are important: s makes a single image, and m adds transparency metadata. If your image does NOT have transparency, remove the m flag. d is not so important but makes your image look nice.
  3. If your image does NOT have transparency, you need to change berry[i].has_opacity_metadata = false;. Otherwise, the code will read part of your image as a mask. :)
  4. Edit the produced .h file to have the name you want and edit the imports in the main file.

Good luck!

from pico-playground.

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.