Commit Graph

607 Commits

Author SHA1 Message Date
Alexander
40d30f678b Use MAKE_UINT32 when possible for unpacking 2017-08-22 00:06:26 +03:00
Alexander
21d1c4cef5 Merge branch 'master' into 16-bit-rgb-tiff 2017-08-21 22:43:30 +03:00
Alexander
8c64275156 Load 16-bit RGB and RGBA TIFF image 2017-08-21 16:28:29 +03:00
Alexander
fc40ef0c1e Move PREBLEND and BLEND to ImagingUtils.h 2017-08-19 15:58:23 +03:00
Alexander
d64f163760 Move MULDIV255 and SHIFTFORDIV255 to ImagingUtils.h 2017-08-19 15:47:04 +03:00
Alexander
58542fdfb9 Move WORDS_BIGENDIAN to ImagingUtils.h 2017-08-19 15:30:41 +03:00
Alexander
00b65ce1c3 unused 2017-08-19 15:27:39 +03:00
Alexander
762b09cdb5 unroll ImagingPackRGB 2017-08-18 01:46:00 +03:00
Alexander
b4e226714d Faster ImagingUnpackRGB 2017-08-17 23:54:30 +03:00
Alexander
b975f9db92 Merge branch 'master' into resample-roi
# Conflicts:
#	libImaging/Resample.c
2017-08-17 15:43:30 +03:00
wiredfool
e1aba29f9b Merge pull request #2683 from wiredfool/issue_2044
Test/fix for issue #2044
2017-08-17 11:52:07 +01:00
Alexander
4af4256ac3 Use ImagingNewDirty 2017-08-17 12:14:19 +03:00
Alexander
bec01d3b0d Use ImagingNewDirty when possible 2017-08-17 03:23:13 +03:00
Alexander
a941747f14 use ImagingNewDirty 2017-08-17 02:56:51 +03:00
Alexander
e7cdb3718c Merge branch 'master' into fast-filters 2017-08-17 02:50:18 +03:00
Alexander
9cf8f93c64 Merge branch 'master' into fast-merge
# Conflicts:
#	_imaging.c
#	libImaging/Bands.c
#	libImaging/Imaging.h
2017-08-16 22:56:16 +03:00
wiredfool
300dfcf4a4 Test/fix for issue #2044 2017-08-16 11:46:27 -07:00
wiredfool
d3580451e2 Merge pull request #2676 from uploadcare/fast-split
Fast split()
2017-08-16 16:10:33 +01:00
wiredfool
9c4535bc82 Merge pull request #2655 from python-pillow/fast-allocation
Fast image allocation
2017-08-16 15:16:43 +01:00
wiredfool
e7aa155b72 Merge pull request #2654 from python-pillow/storage-cleanup
Storage cleanup
2017-08-16 12:00:32 +01:00
wiredfool
3b0f183d5c Merge pull request #2648 from ifeherva/master
Fixed bc5 decoding
2017-08-16 11:42:31 +01:00
Alexander
c5865f9abe it's implementation detail (SSE rounds automatically) 2017-08-13 17:39:22 +03:00
Alexander
3949fc812a avoid warning: always_inline function might not be inlinable 2017-08-13 16:33:36 +03:00
Alexander
5dbc71b69b already defined 2017-08-13 16:27:54 +03:00
Alexander
b10b134b41 i2f fix 2017-08-13 16:01:01 +03:00
Alexander
c2e0092589 Speed up resampling again a bit ) 2017-08-13 01:10:19 +03:00
Alexander
8d4681ff67 5x5 kernel 2017-08-13 00:33:52 +03:00
Alexander
f3a33da9f3 3x3 kernel 2017-08-13 00:15:57 +03:00
Alexander
b11bba108e accept multiband images in filter (noop) 2017-08-13 00:03:50 +03:00
Alexander
55f153d999 Merge branch 'master' into fast-filters
# Conflicts:
#	libImaging/Filter.c
2017-08-12 23:52:31 +03:00
Alexander Karpinsky
bbe07d4f49 Merge pull request #2670 from uploadcare/threaded-filter
Release GIL in filters
2017-08-12 23:51:08 +03:00
Alexander
49492def9b Merge branch 'master' into fast-filters
# Conflicts:
#	libImaging/Filter.c
2017-08-12 23:43:25 +03:00
Alexander
847dd67a41 serious test for kernel filters 2017-08-12 23:22:59 +03:00
Alexander
38eab1a43f do 3x3 filtering in separate function 2017-08-12 23:07:08 +03:00
Alexander
5353d28e35 copy first and last lines 2017-08-12 22:18:24 +03:00
Alexander
f71b3a8ed7 clip8 function 2017-08-12 22:12:59 +03:00
Alexander
7c3c3273eb compiler makes this for me 2017-08-12 19:41:18 +03:00
Alexander
b454f773bd make things faster 2017-08-12 19:39:11 +03:00
Alexander
a2681a0690 naive implementation 2017-08-12 19:17:21 +03:00
Alexander
91b08b7daa noop core.merge 2017-08-12 19:08:07 +03:00
Alexander
294da4e8f5 error handling 2017-08-12 17:42:49 +03:00
Alexander
6ce6cc7537 faster ImagingSplit 2017-08-12 15:49:46 +03:00
Alexander
ca75d63f3a ImagingSplit implementation 2017-08-12 15:26:00 +03:00
Alexander
559836d97d im.split method
ImagingSplit function without implementation
2017-08-12 15:26:00 +03:00
Alexander
c23b65c670 make ImagingGetBand faster 2017-08-12 15:25:59 +03:00
Alexander Karpinsky
09a2e1641b Merge branch 'master' into resample-roi 2017-08-11 19:10:11 +03:00
Alexander
864a24e7b8 Release GIL in filters 2017-08-11 15:17:47 +03:00
Alexander
3aea175141 use RGBX rawmode for JPEG encoding as well 2017-08-11 04:10:55 +03:00
Alexander
7725d281a5 create separate ImagingJpegUseJCSExtensions function 2017-08-11 04:07:54 +03:00
Alexander
1dcafb93a0 Merge branch 'master' into jpeg-loading-without-convertion 2017-08-11 00:40:21 +03:00
Alexander
ffe0c3b0af Fix Bands.c module indention 2017-08-09 03:48:24 +03:00
Alexander
b6638d8155 divide coefficients before applying 2017-08-07 01:11:05 +03:00
Alexander
557e89fcd3 Fix Filter.c module indention 2017-08-07 00:20:35 +03:00
Alexander
a519851903 ImagingNew2 is always Dirty 2017-08-06 20:08:07 +03:00
Alexander
eb4096ffd5 create dirty images for cropping 2017-08-06 15:01:17 +03:00
Alexander
19a8649589 create dirty images for some operations 2017-08-06 14:22:58 +03:00
Alexander
7a1e70d997 new internal API function ImagingNewDirty 2017-08-06 14:22:58 +03:00
Alexander
0990dadd6d use accurate im->linesize instead of strlen(mode) approximation 2017-08-06 14:12:55 +03:00
Alexander
d55557152b rename ImagingNewBlock → ImagingAllocateBlock
rename ImagingNewArray → ImagingAllocateArray
new utility function with old name ImagingNewBlock
call ImagingNewPrologue outside of ImagingAllocateBlock and ImagingAllocateArray
2017-08-06 14:12:55 +03:00
Alexander
eafa258bd1 destroy image and set MemoryError on overflow check failure 2017-08-06 14:12:55 +03:00
Alexander
6b50ba07fd add tests for Image.new modes 2017-08-06 14:12:55 +03:00
Alexander
ab92adf7c9 move ImagingNewEpilogue functionality to ImagingNewPrologueSubtype
doublechecked: no im->image or im->image8 or im->image32 access
between ImagingNewPrologue and ImagingNewEpilogue anywhere
2017-08-06 14:12:55 +03:00
Alexander
fd9cf03d01 FIX memory leak
ImagingNewEpilogue now is always success
The Imaging object itself is freed through ImagingDelete in case
when memory is not allocated in ImagingNewBlock or ImagingNewArray
2017-08-06 14:12:55 +03:00
Alexander
152104bba3 check args before allocate memory 2017-08-06 14:12:55 +03:00
Alexander
430c53707f no reasons to release GIL for one calloc 2017-08-06 14:12:55 +03:00
Istvan Fehervari
0477278c68 Fixed bc5 decoding
BC5 decoding uses only 2 channels instead of 4. The current algorithm did not initialize the RGBA struct which resulted in random values in the output image. This commit should initialize the decoded RGBA struct, thus setting B and A values to default (0).
2017-08-03 11:07:51 +02:00
wiredfool
5a671830d8 Merge pull request #2541 from uploadcare/fix-truncated-png-loading
Fix truncated png loading
2017-06-21 12:23:15 +01:00
wiredfool
d8f15a0706 Merge pull request #2558 from uploadcare/resize-truncate-coeffs-2
Use round instead of floor to exclude of zero coefficients
2017-06-13 21:03:27 +01:00
wiredfool
1cfb20a2a9 Merge pull request #2533 from hugovk/imagedraw
Add more ImageDraw.py tests and remove unused Draw.c code
2017-06-13 13:10:32 +01:00
Alexander
afc592ad7b replace the excluding of zero coefficients with math power 2017-05-29 14:29:12 +03:00
Alexander
ad883961ac fix hamming filter 2017-05-29 14:29:12 +03:00
Andrew Murray
a8a499cce2 Fixed typo 2017-05-25 21:06:13 +10:00
Alexander
e6da335206 fee → free 2017-05-25 13:59:11 +03:00
Alexander
8c69132579 fix another memory leak 2017-05-23 18:00:15 +03:00
Alexander
873d9ec089 fix memory leak if loading is failed 2017-05-23 18:00:15 +03:00
hugovk
6e9e4c1027 Remove unexposed and unused code 2017-05-15 22:59:25 +03:00
hugovk
2968313bb6 Remove unrunnable code: ImagingDrawWideLine is only called (in _imaging.c) when (width <= 1) is false 2017-05-15 21:17:33 +03:00
wiredfool
4e160cd981 Disable undef on pypy 2017-04-19 13:27:59 -07:00
wiredfool
c3717da45a Undef PySlice_GetIndicesEx, see https://bugs.python.org/issue29943 2017-04-19 12:56:13 -07:00
wiredfool
878881b1b9 Fix Access to be reloaded if the python interpreter is restarted when embedded. Fixes #2268. 2017-03-22 21:20:37 +00:00
wiredfool
949932f45f Pure Python MSP Decoder 2017-03-11 13:50:19 +00:00
Hugo
53e5702557 Update http to https 2017-02-14 11:27:02 +02:00
wiredfool
9c4eafc188 Merge pull request #2382 from hugovk/test-effects
Test linear and radial gradient effects
2017-02-06 21:58:41 +00:00
hugovk
05aa252f9f Tabs to spaces and add defensive brackets 2017-01-29 18:50:30 +02:00
Lukasz Kozuchowski
3ffcd9770c BUG fix: '' in image mode no longer causes a crash 2017-01-29 07:20:44 +01:00
Hugo
e83479edf0 Merge pull request #2263 from wiredfool/tiff_bytesio
Fix for writing Tiff to BytesIO using libtiff
2016-12-09 11:04:41 +02:00
wiredfool
88c43b61b7 Fix for #2258, 2 bit palette images corrupted 2016-12-03 14:08:59 +00:00
wiredfool
b3f8b5fa7d tabs->spaces 2016-12-03 14:07:49 +00:00
homm
98042cd4b7 fix memory leak 2016-12-02 15:40:41 +03:00
homm
7ea0611af4 crop roi for vertical pass if box is used 2016-12-01 21:09:29 +03:00
homm
d382183591 compute bounds and kk before passes 2016-12-01 14:04:31 +03:00
homm
4ff7afbe16 xbounds → bounds
kmax → ksize
2016-12-01 13:48:50 +03:00
homm
c7161af924 set error type when it happens 2016-12-01 04:10:58 +03:00
homm
8d7355e733 do not allocate memory in normalize_coeffs_8bpc 2016-12-01 04:02:22 +03:00
homm
02e1ae3d8f move precompute_coeffs to ImagingResampleInner 2016-12-01 03:26:10 +03:00
homm
2c2bdd80ef split out ImagingResampleInner from ImagingResample 2016-11-30 21:59:21 +03:00
homm
9842505a60 remove fifth argument from ResampleFunction 2016-11-30 20:43:54 +03:00
homm
6def4bfc73 roi → box 2016-11-30 20:01:28 +03:00
homm
4079c7f192 allocate new image outside of ResampleHorizontal/ResampleVertical 2016-11-30 05:27:20 +03:00
homm
44e443fa75 fix int boundaries 2016-11-26 01:38:55 +03:00
homm
ef787bc3f5 use ROI in precompute_coeffs 2016-11-24 06:11:36 +03:00
homm
a1fedc0f8a expose roi to precompute_coeffs (still noop) 2016-11-24 06:05:20 +03:00
wiredfool
76b1eb242e Fix for issue #2206 2016-11-23 06:14:06 -08:00
wiredfool
e43c91cf1c Working 1 bit sun_rle raster file 2016-11-19 19:16:46 -08:00
wiredfool
5df2851f85 Fixed literal expansion, allowed run length > line length 2016-11-19 17:39:30 -08:00
Alexander Karpinsky
5a359fbf28 Fix coefficients calculation (#2162)
Fix coefficients calculation

* test for regression

* detailed comments what is going on
prevent setting the `k[-1]` item

* more readable
2016-10-17 01:31:45 -07:00
homm
a926d2e16f use RGBX raw mode for RGB JPEG images 2016-10-12 23:23:05 +03:00
wiredfool
1a43da7a8b Removed 'Debugging' open_ppm call that didn't check file provided parameters for sanity 2016-10-03 07:27:02 -07:00
wiredfool
c0d2d2a912 whitespace: mixed 8ch tabs + spaces -> spaces 2016-10-03 07:27:02 -07:00
wiredfool
5d8a0be45a Memory error in Storage.c when accepting negative image size arguments 2016-10-03 07:27:02 -07:00
Andrew Murray
4c28926da3 Fixed typos 2016-10-02 21:31:53 +11:00
wiredfool
69ee1e35b8 Merge pull request #2015 from uploadcare/paste-speedup
Speedup paste with masks up to 80%
2016-09-22 10:10:56 +01:00
wiredfool
9c4c16df75 Merge pull request #2068 from Mischanix/dxtc
Move DDS decoders to C, add DXT3, BC7 Decoders
2016-09-22 10:04:23 +01:00
homm
30a5f1a0d0 fix blend macros 2016-09-19 03:12:20 +03:00
homm
003a7523df speedup paste with masks 2016-09-19 03:12:20 +03:00
homm
08edf70321 paste.c formatting 2016-09-19 03:12:20 +03:00
Andrew Murray
572a3d970c Removed whitespace from blank lines 2016-09-03 12:23:42 +10:00
Andrew Murray
00cb14afd7 Removed trailing whitespace 2016-09-03 12:19:04 +10:00
Andrew Murray
5c59603fcf Fixed typos 2016-08-31 20:12:07 +10:00
Robert Nix
2be760ca79 Add support for BC7 to DdsImagePlugin 2016-08-26 02:26:03 -05:00
Robert Nix
b46804ea27 Add support for DXT3 to DdsImagePlugin 2016-08-25 20:12:44 -05:00
Robert Nix
18a91cebcf Move DDS decoders to C
- Fixed inaccurate BC1/BC3 texture decoding
2016-08-25 19:27:48 -05:00
wiredfool
39227ff33c Merge pull request #2091 from wiredfool/pr_2008
Resampling lookups, trailing empty coefficients, precision
2016-08-25 12:58:36 +01:00
Andrew Murray
e0612ab14f Fixed typo 2016-08-25 21:43:31 +10:00
wiredfool
35068e35d1 Merge pull request #2057 from arjennienhuis/RGBa
Add (un)packing between RGBA and BGRa
2016-08-25 12:31:23 +01:00
homm
5c0eb2c365 normalize coefficients in normalize_coeffs_8bpc
increase precision of negative filter lobes. Add test
2016-08-25 04:11:02 -07:00
homm
788810f313 ImagingPrecompute → precompute_coeffs 2016-08-25 04:11:02 -07:00
homm
7d3db1f02a truncate zero coefficients 2016-08-25 04:11:02 -07:00
homm
62388199fa use lookups table instead of two conditions for each channel 2016-08-25 04:11:02 -07:00
wiredfool
5d2667efda Merge pull request #2022 from uploadcare/rotation-pixel-center
Respect pixel centers during transform
2016-08-25 11:40:09 +01:00
Andrew Murray
aad079a669 Fixed typos 2016-08-14 16:44:56 +10:00
Arjen Nienhuis
299713313a Fixed whitespace issue 2016-08-08 00:09:55 +02:00
Arjen Nienhuis
916ea94052 Add packing from RGBA to BGRa 2016-08-07 15:34:45 +02:00
homm
993e49c0be Merge branch 'master' into rotation-pixel-center 2016-08-07 13:47:16 +03:00
Arjen Nienhuis
2ecbcce415 add unpacking from BRGa 2016-08-07 13:32:19 +03:00
homm
87b20389d8 fix any errors 2016-07-28 05:30:27 +03:00
homm
978c37d699 add tests for different PCX encoding cases 2016-07-28 05:29:24 +03:00
homm
f8912a73e0 code style 2016-07-27 14:41:04 +03:00
homm
1321713688 repeat all affine tests with PERSPECTIVE 2016-07-11 00:26:12 +03:00
homm
5232361718 fix errors with pixel center coordinates 2016-07-10 14:16:14 +03:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
homm
66715246c1 remove mitchell filter. Has no advantages over bicubic 2016-07-02 01:54:39 +03:00
homm
a67e5453d5 add tests, fix errors ) 2016-07-02 01:54:39 +03:00
homm
c3d702538d add BOX, HAMMING, MITCHELL filters to resample.c 2016-07-02 01:54:39 +03:00
homm
0e9beed76d add constants for filters: BOX, HAMMING, MITCHELL
rearrange filters everywhere
2016-07-02 01:54:39 +03:00
Andrew Murray
ebf2121338 Removed trailing whitespace 2016-07-01 22:05:18 +10:00
Christoph Gohlke
525ba37722 Fix msvc9/10 compile error 2016-06-30 14:04:53 -07:00
Andrew Murray
5e5bda95e0 Removed trailing whitespace 2016-06-30 20:12:50 +01:00
Alexander Karpinsky
92660a1a05 Merge pull request #1986 from didrix/fix-1979-p2la
Fix issue converting P mode to LA
2016-06-30 17:43:53 +04:00
wiredfool
a5dde79068 Merge pull request #1934 from wiredfool/incremental_removal
Rewrite of Jpeg2k data handling
2016-06-30 12:28:10 +01:00