Comments (7)
It's not too hard to write a script which fetches the latest version and creates a header-only by taking lodepng.h and appending lodepng.cpp to it (except the #include "lodepng.h" line)
from lodepng.
It would be much more convenient, if it would be just header only like GLI or GLM is.
See, sometimes I need to build for WIndows, Linux (Desktop and embedded), Android (all platforms), Integrity and QNX. Then, you also have 32 / 64 bit and so on. So, as soon as a new release comes out, all these libs need to be built.
When using GLI or GLM, you just include the header and that's it. Would be just great, if this would be possible somehow with lodepng as well.
from lodepng.
Lodepng is already easily included in projects as a single source file plus header, without being a separate library. Does that help for this use case?
from lodepng.
In addition, the script would have to make all functions static or inline.
Would that work? Or #including the .cpp file and placing an anonymous namespace around it?
from lodepng.
I need to try it out, if this works out.
from lodepng.
In addition, the script would have to make all functions static or inline.
Hmm, only if it's included from multiple files I think. Else it will just work.
from lodepng.
Oh, I made some further research. I found a repo, which provides a header only solution:
https://github.com/nothings/stb
from lodepng.
Related Issues (20)
- Image verification code
- Deocing PNG with 1 bit alpha is not supported HOT 1
- Flip image HOT 7
- example_bmp2png.cpp process 1bit bmp incorrectly HOT 1
- Warning from `-Wcast-qual`: cast discards `const` qualifier
- fatal error LNK1120: 4 unresolved externals HOT 1
- W64 HOT 2
- sdl2 HOT 6
- vulnerability Discover HOT 2
- what's mean of this define LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS and when should i define it
- code optimization
- Че за хрень 64 бит компиляция HOT 1
- Sudden increase in build size HOT 1
- Memory leaks in function benchmark.
- SEGV on unknown address in function pngdetail. HOT 2
- How to get a JSON string from the encoded image ? HOT 3
- Expected speed? HOT 6
- Fix warnings: `conversion from 'size_t' to 'unsigned short', possible loss of data` HOT 2
- chunk type is restricted to the decimal values 65 to 90 and 97 to 122
- Veracode discovered a race condition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lodepng.