aprzn123 / TheThirdCan

A browser extension designed to improve https://twocansandstring.com
MIT License
7 stars 4 forks source link

Add replica of Eric's Image Converter #38

Open aprzn123 opened 1 year ago

aprzn123 commented 1 year ago

Would be nice to be able to use it without manually messing with the javascript.

HumanoidSandvichDispenser commented 1 year ago

we might need an image manipulation library for this

HumanoidSandvichDispenser commented 1 year ago

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.

aprzn123 commented 1 year ago

That seems feasible, especially since once the backend is fully up (tsar is surprisingly hard), it'll be pretty microservice-y

HumanoidSandvichDispenser commented 1 year ago

I just remembered, a problem with using a REST API is that users with content filtering may not be able to use it.

aprzn123 commented 1 year ago

True. Perhaps I can see if they can access my other domain better.

HumanoidSandvichDispenser commented 1 year ago

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

aprzn123 commented 1 year ago

oh yeah, perhaps I should figure out how to use docker. I've been fine without it so far, but it seems useful.

HumanoidSandvichDispenser commented 1 year ago

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.