Live data from Hacker News

HTML is a native image format, hear me out

hmml.eddocu.com

1–10 of 64 posts

Re: HTML is a native image format, hear me out

#2
## What's an image

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. `html is underdog`

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

``` ```

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. or

===

``` 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. ```

bs or not. what you think?

Re: HTML is a native image format, hear me out

#3
wait this is actually kinda brilliant in a weird way

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

Re: HTML is a native image format, hear me out

#5

that sounds interesting but can't find clear use cases

In fact it has lots of use cases,

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

Re: HTML is a native image format, hear me out

#10

I would rather see native browser support for the familiar MHTML ( https://bugzilla.mozilla.org/show_bug.cgi?id=40873 ) than creating a brand new format that does the same thing. The AI slop homepage is really offputting too.

Chrome started supporting this at some point (though I wish they would've added in motw support). Lack of support for mhtml is one of the things keeping me away from Firefox on mobile.
Post reply on HN