Commit Graph

7 Commits

Author SHA1 Message Date
Stefan 63e58ba035 feat: add banner support for communities
Add banner image as a special `IdentityImage` beside "thumbnail" and "large"

Banner input cropped image processing

- Resize to keep in the limits of `BannerDim`
- Encode to match the file size limits define for banner
- Don't scale up. This can be done efficiently in the UI

Changes to `images` module

- Refactor `EncodeToBestSize` as `EncodeToLimits` to accept arbitrary dimensions
  and allow for custom size
- Define `DimensionLimits` for banner not to exceed 450 KB and a rough estimate
  for the ideal size
2022-05-27 14:42:14 +03:00
Samuel Hawksby-Robinson a7358fcd3f images package tidy up 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 8ec0ec4341 Added TestEncodeToBestSize() 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 3b7fbf94d3 Added SaveProfileImage endpoint
Also added EncodeToBestSize func
2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 9bc240fc71 Improved Resize() and added tests 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson a6df8adeba Renamed Decoding and Encoding funcs 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson bb1e232ffe Improved images.Crop() and implemented testing 2020-12-17 14:10:00 +01:00