wiredfool
1428e4140a
Test for identical handling of getheader/getdata
2017-03-08 01:35:15 -08:00
wiredfool
676d0c3b3b
Can't use objects in default args
2017-03-08 01:35:15 -08:00
wiredfool
51b46e00c2
Refactor out passed in palette handling, add ImagePalette as an option, document palette format
2017-03-08 01:35:15 -08:00
wiredfool
f6b22bf0ab
moved normalise_ functions together
2017-03-08 01:35:15 -08:00
wiredfool
abb7b7342e
Added function docstring
2017-03-08 01:35:15 -08:00
wiredfool
770c423181
Regroup methods, add docstring comments
2017-03-08 01:35:15 -08:00
wiredfool
46287eb62a
Renamed _get_local_header to _write_local_header
2017-03-08 01:35:15 -08:00
Andrew Murray
ab7e07c54d
Added comment that getdata is legacy
2017-03-08 01:35:15 -08:00
wiredfool
aea2a4ca8d
legacy getheader mutates the image
2017-03-08 01:35:14 -08:00
wiredfool
872bce552f
Docstring Comments on methods
2017-03-08 01:35:14 -08:00
wiredfool
f5e836b442
removed extra param from _get_global_header
2017-03-08 01:35:14 -08:00
wiredfool
321c6165c9
removed extra params from _get_palette_bytes
2017-03-08 01:35:14 -08:00
wiredfool
b315b6ecf3
Don't requantize 'P' images
2017-03-08 01:35:14 -08:00
wiredfool
26e145c8a3
Refactor _convert_mode -> _normalize_mode
2017-03-08 01:34:31 -08:00
wiredfool
b9618b3ce7
Encoderinfo fix
2017-03-08 19:41:18 +11:00
wiredfool
cee397ab00
Refactor get_palette to do one thing, and not mutate the image in place
2017-03-08 19:41:18 +11:00
wiredfool
1e9afb3ecb
Refactor out the palette remapping to Image.Image
2017-03-08 19:41:18 +11:00
wiredfool
24285fdc28
Remove support for PIL plus external encoder
2017-03-08 19:41:18 +11:00
Andrew Murray
87a14ce6de
Created _write_single_frame and _write_multiple_frames from _save
2017-03-08 19:41:18 +11:00
Andrew Murray
d45f1d835b
Removed second return value from _get_palette_bytes
2017-03-08 19:41:18 +11:00
Andrew Murray
26cfa8cc62
Extracted core of getheader into _get_global_header
2017-03-08 19:41:18 +11:00
Andrew Murray
a43295c3dd
Extracted core of getdata into _write_frame_data
2017-03-08 19:41:18 +11:00
Andrew Murray
af57ff8d45
Simplified code
2017-03-08 19:41:18 +11:00
Andrew Murray
b06669f670
Resolved GifImagePlugin FIXME
2017-03-08 19:41:18 +11:00
Andrew Murray
f28084ae3e
Removed unnecessary copy operation
2017-03-08 19:41:18 +11:00
Andrew Murray
ce87310026
Merged _get_used_palette_colors into _get_optimize
2017-03-08 19:41:18 +11:00
Andrew Murray
4df1305073
Only call _get_used_palette_colors when necessary
2017-03-08 19:41:18 +11:00
Andrew Murray
bf0b4cf279
Minor code cleanup in GifImagePlugin
2017-03-08 19:41:18 +11:00
Andrew Murray
562458cdd3
Added _save_netpbm comment
2017-03-08 19:41:18 +11:00
Andrew Murray
798fde57ca
Removed unused imports
2017-03-03 21:38:19 +11:00
Andrew Murray
f9a99652e4
Replaced KeyError catch with dictionary get method
2017-02-25 13:49:05 +11:00
Jon Dufresne
cecdb2af61
Send unwanted subprocess output to /dev/null
...
Avoids unnecessary creation of temporary files as well as unnecessarily
storing process output in memory. The temporary files would sometimes
remain and not be cleaned up.
2017-01-26 17:31:29 -08:00
Andrew Murray
58b5c9187d
Replaced absolute PIL imports with relative imports ( #2349 )
2017-01-17 13:22:18 +00:00
Andrew Murray
a06dd59df7
Added context managers
2016-12-28 09:54:10 +11:00
wiredfool
944a470a79
Merge pull request #2312 from wiredfool/pr_2298
...
List of individual frame durations for saving animated gifs. #2298
2016-12-27 12:00:40 +00:00
wiredfool
f36a04570f
Merge pull request #2313 from wiredfool/pr_2196
...
Unified different GIF optimize conditions #2196 , Test for #2196
2016-12-27 11:53:50 +00:00
wiredfool
e530f2a228
Added tuple option for durations
2016-12-27 03:04:37 -08:00
wiredfool
87092ad4f8
can pass list of integer to set different duration for each frame when saving GIF
2016-12-27 02:44:05 -08:00
Jon Dufresne
ffa5bc2726
Use generator expressions instead of list comprehension
...
Avoids unnecessary temporary lists in memory.
2016-11-14 18:11:15 -08:00
Andrew Murray
2ba2763f0b
Replaced range(len()) with enumerate
2016-11-05 19:09:14 +11:00
Andrew Murray
a51dc7dcaf
Unified different GIF optimize conditions
2016-11-05 13:32:02 +11:00
Jon Dufresne
7992d2a65a
Fix BytesWarning discovered while running tests
...
Discovered using the command:
python -b -m nose -vx Tests/test_*.py
2016-10-22 12:35:44 -07:00
wiredfool
a51d3bcdba
Speed up Gif save optimization step: don't do it as often and do it in C. Fixes #2093
2016-09-26 14:51:28 -07:00
Andrew Murray
b346ed36f1
Added append_images parameter to GIF saving
2016-09-11 12:04:01 +10:00
Andrew Murray
be7a191b6e
Added local color table for subsequent GIF frames
2016-09-11 11:57:45 +10:00
Andrew Murray
8298fcce73
Added support for GIF comment extension
2016-05-07 13:57:40 +10:00
Andrew Murray
384d32969d
Replaced flush try except with hasattr
2015-12-10 09:22:30 +11:00
Andrew Murray
e9a6a96053
Specified exception type
2015-12-02 16:23:49 +11:00
Andrew Murray
1b8d12b048
If only one frame, do not use image from sequence
2015-08-24 23:51:02 +10:00
Andrew Murray
e88e90b8ed
Minor improvement, one less copy
2015-08-24 23:23:52 +10:00