Commit Graph

30 Commits

Author SHA1 Message Date
scaramallion
4e7f041795 Rename parameter and add more tests 2022-03-31 22:13:17 +03:00
scaramallion
f8a74cbed1 Fix priority when selecting j2k kind 2022-03-31 22:13:17 +03:00
scaramallion
de26f78eb1 Add 'mct' and 'use_jp2' options for J2K saving 2022-03-31 22:13:17 +03:00
Andrew Murray
72b7ab54bd pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
Andrew Murray
6596e31605 Determine mode purely from ihdr header box 2021-08-05 01:06:01 +10:00
Andrew Murray
dab5721c34 Favour integer operations when calculating DPI 2021-08-02 22:09:35 +10:00
Andrew Murray
8828080868 Removed unreachable code 2021-08-01 18:39:54 +10:00
Andrew Murray
0c600f1d88 Prevent reading past end of file pointer even if box length allows it 2021-08-01 18:39:47 +10:00
Andrew Murray
3ee5a9b094 Stop reading from "res " after all information is extracted 2021-08-01 18:39:35 +10:00
Andrew Murray
ae54838146 If DPI is invalid, ignore it instead of raising an error 2021-08-01 18:38:56 +10:00
Roger Baumgartner
5f4653d0b4 Attempt to read dpi information from JPEG2000's resc header box 2021-06-30 06:43:33 -07:00
Roger Baumgartner
7f275c1bfc Create BoxReader helper class to parse JPEG2000 header 2021-06-30 06:43:33 -07:00
Andrew Murray
6d8f2f95db Do not reduce size if tile already loaded
Co-Authored-By: Alexander Karpinsky <homm86@gmail.com>
2020-03-29 16:27:43 +11:00
Andrew Murray
4f9118bdbd Added comment [ci skip] 2020-03-29 16:27:37 +11:00
Andrew Murray
ff6ca4159a Prevent masking Image reduce method 2020-03-29 16:27:29 +11:00
Hugo
0c5895470c Remove deprecated __version__ from plugins 2019-11-05 17:01:03 +02:00
Jon Dufresne
d50445ff30 Introduce isort to automate import ordering and formatting
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.

Uses the configuration recommended by the Black to avoid conflicts of
style.

Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Hugo
53a7e35004 Format with Black 2019-06-10 18:22:46 +03:00
Hugo
b75210d824
Merge pull request #3572 from jdufresne/seek-constants
Replace .seek() magic numbers with io.SEEK_* constants
2019-02-27 23:30:27 +02:00
Jon Dufresne
a11fed32b3 Deprecate PIL.*ImagePlugin.__version__ attributes
Use PIL.__version__ instead.
2019-02-02 17:39:55 -08:00
Jon Dufresne
a00fc33c04 Replace .seek() magic numbers with io.SEEK_* constants
A bit more readable.

https://docs.python.org/3/library/io.html#io.IOBase.seek
2019-01-12 18:22:07 -08:00
Andrew Murray
bd7422f934 Detect whether mimetype is image/jp2 or image/jpx 2019-01-02 15:39:39 +11:00
Hugo
c353225851 Prefer 'except Exception:' to bare 'except:' 2018-12-04 23:25:28 +02:00
Andrew Murray
61397de88b Check quality_layers type 2018-11-16 23:31:42 +11:00
Andrew Murray
0adeb82e98 Changed Image size property to be read-only by default 2018-09-30 13:45:18 +10:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Lucy Phipps
98cff5320a unpack_from is faster than unpack of slice 2018-06-24 18:00:22 +01:00
Hugo
d61921455e Prevent TypeError for JPEG2000 parser feed 2018-03-18 11:13:33 +02:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00