Skip to content
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

Support focal points #19

Open
toastal opened this issue Dec 4, 2019 · 2 comments
Open

Support focal points #19

toastal opened this issue Dec 4, 2019 · 2 comments

Comments

@toastal
Copy link

@toastal toastal commented Dec 4, 2019

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.

@toastal toastal changed the title Specify the position of thumbnails/previews to avoid bad crops Suggestion: Specify the position of thumbnails/previews to avoid bad crops Dec 4, 2019
@toastal toastal changed the title Suggestion: Specify the position of thumbnails/previews to avoid bad crops UI for specifying the position of thumbnails/previews to avoid bad crops Dec 4, 2019
@trwnh trwnh changed the title UI for specifying the position of thumbnails/previews to avoid bad crops Support focal points Dec 4, 2019
@trwnh

This comment has been minimized.

Copy link
Member

@trwnh trwnh commented Dec 4, 2019

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

This comment has been minimized.

Copy link
Member

@dansup dansup commented Dec 9, 2019

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!

@dansup dansup transferred this issue from pixelfed/pixelfed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.