|
I've got a web wizard who has developed my htcw_gfx library's website so far, including this page:
Font/Image Converter[^]
Which despite the name is pretty much a one stop shop for converting multimedia assets into a header you can use in your htcw_gfx enabled C++ IoT projects .
It is entirely client side, so it potentially works offline (as long as you download the supporting web files), and we want to keep it that way.
However, I ran into a snag with doing the SVG -> header conversion.
The soon to be released latest version of htcw_gfx will happily parse SVG XML and so you can embed that in a header, but it's big, and parsing it is inefficient and leads to more fragmentation of the heap than is really desirable.
So to that end, I am producing a preparsed binary format that represents SVG data in a more compact and efficient form. The idea is that can be loaded and rendered readily.
Bear with me. How I plan to do that is to take the SVG data structures I've built up and write them out in a block with markers in it that tell me how much memory to allocate ahead of time and a fixup list for the internal structure's pointers when it's located into memory (turning offsets into memory pointers basically)
I then plan to store that and work with it. Loading it is almost instant and doesn't fragment the heap since i can do one allocation all at once with all of the nested pointers and such contained within that one single malloc'd block.
Implementing that in javascript in order to bring that facility to the web tool above is next to impossible.
I thought we were out of luck until I was reminded of this: Main β Emscripten 3.1.33-git (dev) documentation[^]
I'll just wasm my htcw_gfx library into the browser and call into "C++" from javascript all on the client side.
What a world.
To err is human. Fortune favors the monsters.
modified 3-Mar-23 2:39am.
|
|
|
|
|
Recommended it on Slant!
(oops I did it again, should not mention Slant anymore)
|
|
|
|
|
I never needed to do any web-assembly, but always wondered how it can be smoothly done. Guess I aint wonderin' no more.
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Could you update the converter to include target device info and have it convert to a different format?
For embedded, why would you want to preserve SVG format?
Unless you are adding zoom+scroll features to one of your e-ink displays?
I can see use there, but mostly for dynamic/downloaded content, not built/in content.
Thanks for all of your sharing, this really keeps our brains churning!
|
|
|
|
|
Because SVG is vector, and I'm rendering vector graphics at a user supplied scale, or potentially doing user transforms on it, the inherent vector nature of the SVG must be preserved.
Additionally the rasterization engine in it serves as the basis for doing anti-aliased vector drawing operations.
I'm currently working on the binary form as I mentioned in the OP.
I have absolutely no need to prerasterize SVG. My GFX website will already do that for you for making icons.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Wordle 622 4/6
π©β¬π¨π¨β¬
π©π¨π¨β¬β¬
π©β¬β¬π©π©
π©π©π©π©π©
|
|
|
|
|
Wordle 622 5/6
π¨β¬β¬β¬π¨
β¬π¨β¬π©β¬
β¬π¨π©π©β¬
π©π©π©π©β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 622 5/6
β¬π¨β¬β¬β¬
β¬β¬π¨π¨π©
π©β¬β¬π©π©
π©β¬β¬π©π©
π©π©π©π©π©
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wordle 622 2/6
β¬β¬π¨β¬β¬
π©π©π©π©π©
tried new second word today and to my surprise that turned out to be the word!
|
|
|
|
|
|
Wordle 622 3/6
π©π¨β¬β¬π©
π©β¬π¨β¬π©
π©π©π©π©π©
|
|
|
|
|
Wordle 622 3/6*
π¨β¬β¬π¨β¬
π©π¨π¨β¬β¬
π©π©π©π©π©
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 622 3/6*
β¬β¬β¬π©π©
π©β¬β¬π©π©
π©π©π©π©π©
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
β¬β¬π¨β¬β¬
π¨β¬β¬β¬β¬
β¬π¨π¨β¬β¬
π©π©π©π©β¬
π©π©π©π©π©
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming βWow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 622 4/6
β¬π¨β¬β¬π¨
π©π¨π©β¬β¬
π©π¨π©π¨β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 622 X/6
β¬π¨β¬β¬β¬
β¬β¬π©β¬β¬
β¬β¬β¬β¬π¨
β¬π¨π©π¨β¬
β¬π¨π©π©β¬
π©π©π©π©β¬
Freaking native americans, I knew I should have remained in Europe.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
published under the CPLLOSPL (CodeProject Lounge Lizard Open Sauce Poetic License) guidelines. Β©ColorlessKarmaChameleon
~
the people who huddled together in dim caves,
sheltering from nuclear winter's bitter cold:
waited for the holograms to materialize with
the usual hunger gnawing their empty bellies
the war between ChatterbotGPT, and QuantumAI,
that led to selectively breeding the species
formerly known as Homo Sap for raw materials
had long discarded the uselessly dull result
humanity's remainder was not worth recycling:
maybe there was entertainment value for some
over stressed server watching analog wetware
fighting, breeding, imagining gods who cared
an algorithm picked the next human sacrifice
necessary with perfectly ruthless randomness
~
Β«The mind is not a vessel to be filled but a fire to be kindledΒ» Plutarch
|
|
|
|
|
What! No Metaverse! We are truly doomed!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
bookmarked and upvoted.
Most excellent.
|
|
|
|
|
Cheerful thoughts for a rainy Friday.
Iβve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
Pretty dark. where's the punch line? Oh what! "We are doomed by our own wits!"
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
...but in French it translates to Cat, I have farted
|
|
|
|
|
|
Google translate voice synthesizer sounds agreeable.
|
|
|
|
|
20 Newly Discovered Terry Pratchett Stories Will Be Published This Year | Tor.com[^]
tl;dr version: Quote: It turns out that early on in Pratchettβs career, he had at least twenty stories published under a pseudonym...The collection sold to Transworld, the publisher of Pratchettβs other works, and will be released in the U.K. on October 5, 2023 under the title, A Stroke of the Pen: The Lost Stories
TTFN - Kent
|
|
|
|