Commit graph

25 commits

Author SHA1 Message Date
Ankush Menat
987be17ea1
perf: Reduce memory usage of exif stripping (#35566)
This was at least 4x inefficient because of:

- Way too many copies of same buffers
- Serialization of binary data to python integers :woozy: using `list()`
2025-12-31 11:30:13 +00:00
Raffael Meyer
71eb3704bd
fix: preserve exif data in optimized image (#27341) 2024-08-08 11:28:32 +02:00
Akhil Narang
26ae0f3460
fix: ruff fixes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
0fd6f5eed7
Merge pull request #23827 from frappe/api-docs
docs: add Python API missing docstrings / type hints
2023-12-21 12:13:05 +05:30
Ankush Menat
3524cae48e fix: ignore and gracefully handle img optimization failure
PIL doesn't handle ALL image types. E.g. HEIC fails with bad error.
2023-12-20 12:25:56 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Suraj Shetty
67a32bd054 fix: Set minimum resolution of image 2023-08-02 10:54:36 +05:30
Suraj Shetty
3621daf699 fix: Compress bit more agressively 2023-08-02 09:25:48 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Gavin D'souza
fc422f4a97 chore(deps): Bump Pillow from 9.0.1 to 9.1.1
Includes security fixes, API & constants deprecations

Changelog: https://pillow.readthedocs.io/en/stable/releasenotes/index.html
2022-06-10 13:12:35 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
phot0n
afb3dbc59c fix: upload jpeg image with alpha channel 2021-12-13 13:33:53 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
MitulDavid
2d887187d2 refactor: Toggle optimization using checkbox 2021-08-06 18:31:41 +05:30
MitulDavid
a3430ca2a9 feat: Image optimization 2021-08-02 18:23:26 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Abhishek Balam
e306f5601c fix: made requested changes 2020-11-30 18:58:53 +05:30
Abhishek Balam
7d4992549d feat: added option in system settings to remove exif tags, default 1 2020-11-30 17:19:35 +05:30
Abhishek Balam
3a074756c1 fix: removed content_type param 2020-11-30 14:58:01 +05:30
Abhishek Balam
bd2e3530cd fix: strip exif data from image files before uploading 2020-11-30 11:59:16 +05:30
tundebabzy
7b41d7e5eb Python 3 compatible print statements (#3199)
* changes print statements in file to python 3 compatible style using `__future__`

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* changes deprecated md5 module to hashlib

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements

* adds python 3 style for print statements
2017-05-01 12:34:29 +05:30
Anand Doshi
2995f02f3b Web Notes to Frappe, better alerts, css fixes, fixed splash 2015-03-03 15:09:34 +05:30
Rushabh Mehta
487a4fed32 started client side testing using selenium and other related and unrelated fixes 2014-04-30 19:39:35 +05:30
Rushabh Mehta
44be375b39 resize_images 2014-04-27 10:02:46 +05:30