Giter VIP home page Giter VIP logo

Comments (6)

stinos avatar stinos commented on July 23, 2024

Not sure what you mean? This library doesn't depend on SDL nor openGL, and can be compiled with a plain C compiler.

from lodepng.

lvandeve avatar lvandeve commented on July 23, 2024

Yep, it does support plain C90. There is an ifdef for C++ and for C in the same file, you can rename the .cpp to .c. It is just integrated all in one source file to keep it a single file library :)

from lodepng.

spartrekus avatar spartrekus commented on July 23, 2024

The good thing would be that there is X11 (without SDL or Opengl). Just show a picture using the basic Xorg X11 library.

from lodepng.

lvandeve avatar lvandeve commented on July 23, 2024

The core library itself is purely a "convert one byte stream to other byte stream" encoder/decoder, which doesn't interface with other libraries like graphics renderers. Adding such dependencies, even optional, is out of scope for this library.

An example, like the SDL example, might work. It would be more an example showing how to draw pixels in X11 than it is about PNG, but the SDL example is like that too of course. A contribution of such an example similar to the SDL one is welcome.

from lodepng.

spartrekus avatar spartrekus commented on July 23, 2024

The problem is that since sdl 2.0 and higher versions, the graphical applications may run slow on many hardwares.

Really x11 is surely not very fancy, beautiful, but it is just working (reliable).

from lodepng.

lvandeve avatar lvandeve commented on July 23, 2024

Well but the SDL example is just an example, if you want fast rendering it's better to use a good rendering engine anyway (SDL seems fast to me by the way, at least when I used it in the 1.2 era). Like, if X11 suits your needs, why not that one indeed.

In a real world application where speed matters, I assume you want to do more than just display a single PNG image in a window that closes as soon as you press any key, so there will be more work needed anyway than what a simple example in a PNG decoding library can give.

from lodepng.

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.