Commit Graph

9 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
Shivek Khurana a6e7ff6ddd
🖼 Set any url as profile picture (useful for NFTs) (#2367)
* Sound check
* Add DecodeImageURL fn
* Introduce crop dynamics
* Add center crop calculations png

* Apply suggestions from code review
Co-authored-by: RichΛrd <info@richardramos.me>

* Fix lint
* Rebase and update version
Co-authored-by: RichΛrd <info@richardramos.me>
2021-09-21 14:30:44 +05:30
Andrea Maria Piana 58f2dac673 Remove image log 2020-12-17 14:10:00 +01:00
Andrea Maria Piana 618524d8cb debug 2020-12-17 14:10:00 +01: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 9bc240fc71 Improved Resize() and added tests 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
Samuel Hawksby-Robinson 17f0bac6ae Added basic code from https://github.com/status-im/image-resizer
Made some modifications to suit a general approach, more changes need to be applied
2020-12-17 14:10:00 +01:00