like when you think about it we're already doing this with svg and nobody bats an eye. svg is literally xml markup that renders as an image and everyone just accepts it as normal
also the composability angle is interesting. being able to edit an "image" by just opening it in text editor instead of photoshop has some appeal
1- For design tools, they can combine multipe images, texts, svgs and serve them with single pack/abstraction
2- When you need editable/composable images.
3- Future genai models for generating visuals/html/js/svg would have more feature rich abstraction/toolset
4- When you want to prevent base64 size overhead
https://x.com/yeargun24/status/1825516494861508943?s=20
And, yes. HTML & CSS rendering without js is doable with like max 400mb of ram? Idk. Sometimes the tradeoff worths, sometimes not
PDF is an irreversible format in terms of editability. (btw I build the world's most performant pdf/pptx editor at https://eddocu.com , I would enjoy if you have any feedback)
Regardless, I cant find the relation in between.
It's like an abstraction that might help future genai models, or a packing strategy, or ..
The AI slop homepage is really offputting too.
""" Open Bug 40873 Opened 26 years ago Updated 27 days ago """
So if you need some such feature in your web app, and if you are okay with 2kb encode/decode js. Its all good.
At least the posts are pretty much not AI slop I guess.. But I'll take your feedback. Thanks!
That's a particularly long discussion.
Is it HTML and its contents (e.g. images) in a binary format?
you can go devtools at https://hmml.eddocu.com
it downloads single binary that contains media assets (svg, image, video, ..) and html/css blueprint, even js (security concerns!)
- Come up with a file extension (.hmml)
- Decide on an entrypoint filename and format (index.html)
- Use an existing standard for combining resources into one file (tar + zstd)
Now you have something that is usable only using pre-existing tools.
in fact this is both a packing strategy or a POV of thinking. Next browser versions could support it.
<img src="html-underdog.hmml" />
or
when tomorrow's genai models mix declarative images with rasters, then they would like something like this
or
OS -> html-underdog.html double clicks -> browser opens it.
Then with html + rasterized images (.jpeg/.png, ..) you would have to pay extra size overhead caused by base64.
With hmml, you dont
Say I want to distribute an hmml file as a single file, I'd have to create an html with the embedded js runtime, and then embed the hmml file... as b64, therefore negating any benefits.
https://eddocu.com It's the worlds most performant pdf / pptx editor on web.
I have a page that I list documents, each with their thumbnails. I serve medium quality rasters(.webp) for them.
I could rather do it via hmml to save up network space for instance. I convert pdf/pptx/docx into completely editable with html at Eddocu.
So I already have everything in html, css, svg, image.
For the ones that can get represented with .hmml i could serve hmml link maybe.
Its an overengineering maybe.
But thats how I made https://eddocu.com world's most performant pdf/pptx editor. (alpha release, has bugs.)
Plus zipping that one file is you insist on a smaller file size
Even then base64 is worse in size though
Also I wouldn't prefer serving a zip and load and render it within my web app (extra overheads).
I got lost
in the meantime you can take a look at this
yeargun•1h ago
We consider rasters as image (.jpeg, .webp, ..)
We also invented svgs, its a vector. SVG is a declarative language, has its own format and has own renderer
HTML, CSS is no different. `<div style="background:black">html is underdog</div>`
Having this perspective on our mind, even considering any imperative code as a native image makes complete sense. `canvas.drawCircle();`
So, .html/.hmml/.js is as image as .webp
====
## How can we/future's genAI models could leverage the world's most popular and feature rich image format (HTML, CSS, JS, SVG, IMAGE altogether). And how can we leverage it to build editable/composable images?
This so to 'popular' image format we call .html has a caveat. It's UTF-8, and whenever you need to embed any resource, you either need to base64 encode it(it has extra size overhead) or link the resource as a seperate thing. So.. as you decide to serve single pack of data for a single image, a binary packing strategy makes sense.(Image can be anything as we discussed earlier)
To match these concerns, we created/proposing you a new format, HMML (HyperMedia Markup Language).
HMML (HyperMedia Markup Language) is a declarative+imperative markup+ language for images/videos/media.. *HMML is HTML, CSS, JS, SVG, image, but not UTF-8.*
https://hmml.eddocu.com
and we have a npm library that does encode/decode of this binary format, and mounts the so to image into dom. (2kb js for encode/decode each. For comparison React is 90kb js. )
`npm i @eddocu/hmml`
# image-leftdog-rightcat.html
``` <div style="display:flex"> <img src="base64" alt="i am dog image" /> <img src="base64" alt="i am cat image" /> </div> ```
Apart from doing this, hmml does embed the html, css, js blueprint into media binaries
# image-leftdog-rightcat.hmml
`binary stuff`
People already do similar things. But this format or POV of thinking accepts html/css/js as a native image format. Excited to see if future operating systems/browsers also accepts this format. <hmml /> or <img src="maybe.hmml" />
===
``` <Technical-Appendix> The word "green apple" is an image, that has no format and no renderer.
`const vectorMultiDimensional_768 = get_word_embeddings("green apple")` Now the word green apple has a format, its: "embedded by Embedding Model X" If you had a renderer as such Embedding_Model_X.render()
Now you could call entire english sentences/paragraphs are images. </Technical-Appendix> ```
bs or not. what you think?