canonical / snapcraft.io

The official website's repository for the Snap store
https://snapcraft.io/
Other
145 stars 108 forks source link

Cropping for snap icons #903

Closed evandandrea closed 6 years ago

evandandrea commented 6 years ago

The Snap Store requires a 256x256 icon. Can we let the user crop down to the right size client-side?

Greggless commented 6 years ago

Hey @evandandrea đź‘‹

Where do you see the use case for this feature? I think that creating an interface to allow the user to crop an icon is a lot of work for something which they could do, and more than likely would do, on their own machines.

We could allow the UI to auto-scale an icon to get avoid running into errors with a non 256x256 icon. That way we would only need to implement a min/max resolution for the asset and the GUI would do the rest.

matthewpaulthomas commented 6 years ago

Agreed with @Greggless. Cropping makes sense for a human’s profile photo, because the camera probably wasn’t positioned with the specific intent of taking a closely-cropped avatar. But an app icon was almost certainly drawn with the correct margins etc to begin with.

It might be useful to offer cropping as a function for custom header artwork, since that’s more likely to come from a photo.

bartaz commented 6 years ago

As a first step we could detect the dimensions of the image client-side and warn users before they save/upload it.

Partial solution (that is easier to build then full cropping UI) would be to automatically scale any (square) image larger then 256x256 to correct size. Ideally it could be done on store side, but potentially we could do it on client side as well before saving icon with API.

evandandrea commented 6 years ago

But an app icon was almost certainly drawn with the correct margins etc to begin with.

Yes, the more I think about this the more comfortable I am with closing this issue. My original thinking was that while anyone can open up an image editor and resize or crop (not all icons are square), it feels like you're being made to do something that could easily be done for you. However, I'm not seeing a lot of prior art to support.

matthewpaulthomas commented 6 years ago

Thanks @evandandrea. If you find some examples of non-square-proportioned app icons, perhaps report a separate bug for us to transparently letterbox/pillarbox them on upload.