pixelfed / ideas

Issues board used for Pixelfed suggestions
8 stars 1 forks source link

Support focal points #19

Open toastal opened 5 years ago

toastal commented 5 years ago

Given that in many places in the UI for some aesthetic choice, images are fit to a square. Obviously not all images are square and many images aren't center-weighted for composition and as a result, many images get cropped in an unpleasant manner.

I would propose that there be a UI element for choosing the object-position--or background-postition where CSS backgrounds are used as a hack.

The on option could be a 9-point element denoting the possibilities for the keywords that happens after the filter selection phase. The 9 points would correspond to the x and y values top / center / bottom and left / center / right. This would update the thumbnail in that UI as well. This could be modeled as the product of two sum types for x and y.

Another option, would be the ability to drag that thumbnail around and get a relative percentage. It could correspond to 2 <input type=number> or <input type=range>s that could be used to dial in an exact amount and make it more discoverable. This could be modeled as the product of two floats for the percentages.

Another option (not recommended), could be a straight-up text input under advanced settings so a user could use calc() or whatever. This would need sensitization and could be modeled as a string.

trwnh commented 5 years ago

Mastodon uses toot:focalPoint so it would be nice to support that (-1.0 to 1.0 in x and y axes), but the bigger question is if it actually makes sense depending on the UI and layout of Pixelfed? Currently we do not really do any cropping except for square thumbnails on profiles, as we use fit instead of cover for post views. It would make for nicer thumbnails potentially.

dansup commented 4 years ago

Yeah I'm not sure it makes as much sense as it does on Mastodon since we mostly display full size images. That being said, we can keep this issue open until it gets implemented!