Git Product home page Git Product logo

Comments (6)

lovyan03 avatar lovyan03 commented on August 18, 2024

I understand exactly what you mean, and I was originally going to implement it as well.
However, if you implement it, the template will become larger and the binary size will become huge. I believe this implementation was a failure.

from lovyangfx.

lovyan03 avatar lovyan03 commented on August 18, 2024

I actually have quite a few problems with the current LovyanGFX V1 implementation, and am considering creating a new V2 design from HAL. So we don't want to spend time supporting V1.

from lovyangfx.

fsender avatar fsender commented on August 18, 2024

Just add a function prototype like this. I think it takes just a few bytes. However, most of projects do not use this prototype.

from lovyangfx.

lovyan03 avatar lovyan03 commented on August 18, 2024

By the way, if you copy an RGB565 image to a palette image, what kind of result do you expect to get?
If I were to implement this, I would simply allocate the low byte of the bit string.
If you want to automatically select a palette that reproduces the colors of the original image, that would require a fairly tedious implementation.

from lovyangfx.

fsender avatar fsender commented on August 18, 2024

It is not easy to copy a normal image like RGB565, RGB888 etc to a palette image. But it is easier to copy to a 1bpp/2bpp/4bpp greyscale image.

I will create my own transform function if I must copy from an normal image to a palette image.

So, I just hope to add a prototype for creating a static sprite. You do not need to do anything else for V1.

    void setBuffer(void* buffer, int32_t w, int32_t h, color_depth_t bpp = rgb565_2Byte);

Source code reference previous text.

from lovyangfx.

fsender avatar fsender commented on August 18, 2024

Use this setBuffer function, I'll create a static sprite with any color_depth_t.

from lovyangfx.

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.