Open aprzn123 opened 1 year ago
we might need an image manipulation library for this
Alternatively to an image manip library, we could use a REST API.
I'm not sure if this is too much, but I think we should also have options for additional postprocessing and different resampling methods.
That seems feasible, especially since once the backend is fully up (tsar is surprisingly hard), it'll be pretty microservice-y
I just remembered, a problem with using a REST API is that users with content filtering may not be able to use it.
True. Perhaps I can see if they can access my other domain better.
I put together something quick that can take image URLs and generate the request JSON for uploading avatars, and it can add backgrounds if the image is transparent. It was based off of a converter I made 2 years ago. Let me know if there's something I should change.
https://github.com/HumanoidSandvichDispenser/ttc-avatar-image-api
oh yeah, perhaps I should figure out how to use docker. I've been fine without it so far, but it seems useful.
Deploying the avatar image API with docker-compose is actually pretty simple.
If you have docker-compose installed, you can run docker-compose build
to build the container and then run docker-compose up
to deploy it.
I'll upload it soon to Docker Hub so it's easier to deploy alongside @thekifake's pronoun API.
Would be nice to be able to use it without manually messing with the javascript.