-
- Downloads
[IMP] tools,base,web: improve image tools
Add support for a 256*256 image, to be used in the following commit. Define sizes in named variables instead of being hard-coded in several places in the code. Allow parameters `preserve_aspect_ratio` and `upper_limit` to be passed from the different helper methods. Factorize the code inside `image_resize_images` to make it easier to read. Add new function to compute whether the size of an image is above a given size. task-34045 PR: #30656
Showing
- addons/web/controllers/main.py 2 additions, 2 deletionsaddons/web/controllers/main.py
- odoo/addons/base/models/res_partner.py 6 additions, 2 deletionsodoo/addons/base/models/res_partner.py
- odoo/addons/base/tests/test_ir_http.py 1 addition, 1 deletionodoo/addons/base/tests/test_ir_http.py
- odoo/tools/image.py 102 additions, 56 deletionsodoo/tools/image.py
Loading
Please register or sign in to comment