I'll pay $100 in BSV to buy a browser vanilla js library fo…

Twetch ·

I'll pay $100 in BSV to buy a browser vanilla js library for images

Requirements:
- compress jpg, png, and gif to a selected byte size
- resize jpg, png and gif to a selected width and maintain aspect ratio
- input/output in base64 string

Replies

Twetch ·

https://haich.us/library.html

Twetch ·

resize is not good... either distorts or crops the image without user input

Twetch ·

@3 are you trying to tell me what I want to buy?

Twetch ·

messing with this...
https://firebase.google.com/products/extensions/storage-resize-images
compresses + resizes images on upload. as @3 said you still want user input for which I'm using https://foliotek.github.io/Croppie/
nice combo so far

Twetch ·

User input it’s important - it’s clear to me that sometimes you might want to sacrifice quality to a cheaper price

Twetch ·

initial thot - dont complicate it, best image quality default. sat/byte fee will drop over time

Twetch ·

I think compression will be most helpful for images of text, screenshots, and the like, where pixelation doesn't matter much.

Memes are worth the higher quality 😇

Twetch ·

I think compression will be most helpful for images of text, screenshots, and the like, where pixelation doesn't matter much.

Memes are worth the higher quality 😇

Twetch ·

funny thing, if you sufficiently complicate it memes can give the most savings because each component can be saved on chain as a layer, so the background can be reused. Background + text + text position metadata + html5 canvas = cheap high quality memes.

Twetch ·

@100 built something like this using SVG

Twetch ·

Would think compression for pictures of text would be nice, like an optional thing.

Memes are totally worth the extra data 😇

Twetch ·

Yeah, I definitely found my home here.

So many intellectuals around, I LOVE IT!

Can't wait to post memes for 2 cents!