Comments (2)
It can be done with std.base64 and ArrayStream:
import std.base64;
import dlib;
void main()
{
string base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADklEQVR42mL4z8AAEGAAAwEBAGb9nyQAAAAASUVORK5CYII=";
ubyte[] buffer = Base64.decode(base64);
auto strm = new ArrayStream(buffer, buffer.length);
SuperImage img = loadPNG(strm);
img.savePNG("out.png");
}
from dlib.
Nice. Thanks.
from dlib.
Related Issues (20)
- Make dlib entirely GC-free
- dlib error messages on dub build HOT 3
- HTTP client HOT 1
- DMD 2.088.0 deprecations
- dlib.text.unmanagedstring.String should be always null-terminated
- Rendering text on canvas HOT 1
- Audio module HOT 7
- Thread synchronization HOT 1
- Unable to build a project with the dlib dependency HOT 2
- Get rid of toStringz in dlib.filesystem.stdfs
- Build error on Windows HOT 1
- linker error with BigInt.toHash() HOT 4
- image.d(288): Range violation HOT 2
- Increase coverage
- File-based image decoding functions should use ArrayStream internally
- Can't open jpg images with "Progressive DCT, Huffman coding" encoding HOT 1
- 1D and 3D textures support
- Building for Android HOT 2
- More examples in the domument HOT 2
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 dlib.