-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Composition #4276
Comments
Here's a simple implementation idea with backward compatibility: Introduce a new odd tag representing an ordered list of inscription ID layers along with the intended content type. For backward compatibility, the primary content type would still be HTML, with relevant HTML as the content. A new content endpoint, say |
Other possible use for composition could be splitting larger files into multiple inscriptions, and have the ord server automatically stitch them together. |
Although I do agree, on the face of it, it is strange to see HTML inscriptions "pretending" to be images, however, I would opt to embrace this, HTML inscriptions are a gift on ordinals compared to other chains. When we did Pizza Ninjas, it started off as just layering in the canvas, but then we got wild with it and it became a real showcase for recursion and what can be possible with digital collectables on Bitcoin. I would encourage anyone creating recursive collections to go one step further and do some cool features with the HTML/JS. Finding a cool way of standardizing the caching of the "thumbnail" of these inscriptions I can get behind though. |
My proposal wouldn't be a replacement for something like Pizza Ninjas. However, the overwhelming majority of recursion usage is HTML disguised as an image. That's a clear sign we're missing some standardization here. |
I'm having a hard time seeing the concrete improvement. It's difficult to come with a scheme on how to exactly compose the images together (next to each other?, layered on top of each other?, in a grid?). HTML seems like the natural language that can capture all the ways you would want to compose images. Additionally, we don't want to be doing composition on the server side because of DoS concerns. All composition should be done client side. You could emulate something like this by inscribing a javascript library that then composes images together? |
The improvements with some standardization here would be pretty significant. Explorers and CDNs can easily cache the recursive images and we'll no longer see that black screen of death + 1000s of fetch requests on page load. Images would also render natively as images (vs html page containing an image) on all platforms, making sure they display well on all screen sizes. Layering on top of each other is probably the primary usage. But stitching them together is also an interesting use case, as a clear answer to the age-old question re: inscribing larger files. If composing on the server side is a concern, I think some standardization would still be helpful as a starting point and allow building middleware layers for serving content. |
While this looks like an interesting idea, image composition on demand is a good candidate for DoS. Yes, it can be cached, but while cache is computed it will eat a lot of server resources. The best tradeoff so far for pre-rendering html/heavy inscriptions as images is to do it async/outofband and store a thumbnail that can be cached. |
Concerns re: DoS seem rather misplaced to me. Server side image editing isn't some novel idea and has been around since the 90s. And DoS concerns can be worked around in many different ways. That said, standardization even without any server side component would be very helpful. |
One of the primary things many use recursion for is composing images in the browser with the Canvas API. The purist in me dies a little every time I see an HTML page pretending to be an image.
I've always wondered if basic image composition could be supported by the ord server. Previously, I discarded the idea, assuming it was probably too complex. And maybe it still is.
But ordinals have grown significantly since recursion was first introduced, both in terms of complexity and recursive endpoints. So perhaps this idea is worth revisiting.
Considering that maybe 90–95% of recursive inscriptions are for composing images in the browser, should the ordinals protocol add support for image composition in some capacity? Maybe a post 1.0 feature?
The text was updated successfully, but these errors were encountered: