Commit Graph

62 Commits

Author SHA1 Message Date
Christoph Gohlke
b2a4aa2959 Fix size_t not defined in PyPy 2017-10-01 22:16:13 -07:00
Christoph Gohlke
9e650ec713 Fix bulletproof code from libc 2017-10-01 20:07:00 -07:00
Alexander
5a1cdfc72c rename arena->blocks to arena->blocks_pool
fix comments
2017-09-30 15:03:28 +03:00
Alexander
83530975e9 rename lines_remaining 2017-09-30 04:16:12 +03:00
Alexander
9db1b760e5 revert reverse order of blocks associated with the image
take alignment into account when calculating lines_per_block
2017-09-23 06:07:47 +03:00
Alexander
385963928f make MS C compiler happy 2017-09-23 04:56:18 +03:00
Alexander
145180a105 fix alignment 2017-09-23 04:44:01 +03:00
Alexander
6a435793d8 fallback to small block size on memory error
increase default block size to previous value
2017-09-23 04:15:19 +03:00
Alexander
b51d77e4e5 Merge branch 'master' into block-storage
# Conflicts:
#	docs/releasenotes/4.3.0.rst
2017-09-23 04:07:09 +03:00
Alexander
bda6d1e588 rename ImagingCopyPaletteInfo to ImagingCopyPalette 2017-09-19 20:42:13 +03:00
Alexander
db08235c05 reduce size of blocks returned to pool 2017-09-19 00:14:44 +03:00
Alexander
44c2698f69 ImagingMemoryBlock structure 2017-09-18 22:48:32 +03:00
Alexander
67e1e03c79 Set options from environment variables 2017-09-18 21:29:48 +03:00
Alexander
3bfdfcd48a reduce code duplication 2017-09-18 03:57:43 +03:00
Alexander
6d2be876c8 tests 2017-09-18 02:37:47 +03:00
Alexander
af3dcf84af python api for resources 2017-09-18 01:41:39 +03:00
Alexander
53dde3b7f6 fix visual c compiler 2017-09-17 22:46:11 +03:00
Alexander
8659cd7564 stats 2017-09-17 21:31:50 +03:00
Alexander
4951962af1 ImagingMemoryArean tata type 2017-09-17 20:31:13 +03:00
Alexander
dc192be83f temp 2017-09-17 20:10:31 +03:00
Alexander
c8a2923d17 Return blocks in reverse order to reduce reallocations 2017-09-17 19:54:49 +03:00
Alexander
fd907fbdc9 Fix 0-width and 0-height images other way 2017-09-17 03:31:24 +03:00
Alexander
0054743100 fix zero size images 2017-09-17 02:58:01 +03:00
Alexander
6007e818a9 debug messages 2017-09-17 01:40:30 +03:00
Alexander
a5034b54cd do not request more lines than required 2017-09-17 01:34:57 +03:00
Alexander
f2123b4222 limit allocated memory to lines_per_block * linesize size
allocate block for wider lines
2017-09-17 01:22:44 +03:00
Alexander
d4a1f7a01a align lines 2017-09-16 22:58:37 +03:00
Alexander
883fb8f9e9 MEMORY_MAX_BLOCKS should be 0 by default 2017-09-15 19:00:53 +03:00
Alexander
fe283b10a5 Do not use ImagingNewBlock at all 2017-09-15 18:11:20 +03:00
Alexander
f584f8399a save released blocks 2017-09-15 18:00:15 +03:00
Alexander
0a3c852e1b work in ImagingAllocateArray with blocks 2017-09-15 17:50:29 +03:00
Alexander
852124d49b Add params check for ImagingNewBlock 2017-09-15 17:32:49 +03:00
Alexander
f6a05fd22c Rename ImagingCopyInfo to ImagingCopyPaletteInfo 2017-09-15 00:33:04 +03:00
Alexander
a519851903 ImagingNew2 is always Dirty 2017-08-06 20:08:07 +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
Lukasz Kozuchowski
3ffcd9770c BUG fix: '' in image mode no longer causes a crash 2017-01-29 07:20:44 +01:00
wiredfool
5d8a0be45a Memory error in Storage.c when accepting negative image size arguments 2016-10-03 07:27:02 -07:00
wiredfool
54a979749c Rework block allocator 2016-06-08 06:21:38 -07:00
wiredfool
768936fa33 overflow check for im->linesize 2016-06-08 06:21:38 -07:00
wiredfool
d48e5cd500 Convert xsize/ysize to ints in function declarations to match all other uses of xsize/ysize 2016-06-08 06:21:38 -07:00
wiredfool
52d60cd096 Malloc check, #1715 2016-06-08 06:21:38 -07:00
homm
c4b92d09b7 support for La mode 2016-05-26 15:15:08 +03:00