Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6
2021-10-21 12:43:55 +05:30
Kovid Goyal
5cafe198bf
icat: Fix EXIF orientation not taken into account when resizing
2021-09-30 08:45:41 +05:30
Kovid Goyal
4ce2690bd2
DRYer
2021-09-30 08:39:27 +05:30
Kovid Goyal
34ec3eac44
icat kitten: Fix display of JPEG images that are rotated via EXIF data and larger than available screen size
...
Fixes #3949
2021-08-19 09:08:35 +05:30
Kovid Goyal
a22404abe6
Better names
2021-07-28 15:44:17 +05:30
Kovid Goyal
7c06313750
A couple more useful aliases
2021-07-28 15:40:48 +05:30
Kovid Goyal
6f265f448d
DRYer
2021-07-28 15:39:21 +05:30
Kovid Goyal
acdc41bd03
Allow sending no payload
2021-07-28 13:39:15 +05:30
Kovid Goyal
bcff2a7fb6
Add aliases to GraphicsCommand to make it more useable
2021-07-28 13:28:21 +05:30
Kovid Goyal
fe94f4cbb4
Move type parsers for config into own module
2021-05-24 22:29:28 +05:30
Kovid Goyal
6dc8df5178
icat kitten: Respect EXIF orientation when displaying JPEG images
...
Fixes #3518
2021-04-23 07:31:37 +05:30
Kovid Goyal
1aebd83e45
A little clearer code
2021-04-19 17:42:15 +05:30
Kovid Goyal
8225351145
icat: When displaying an animated GIF image with no delays between frames, add a 100ms delay between every frame.
...
This allows some broken images tested with broken software *cough* browsers to work.
See #3498
2021-04-19 17:17:45 +05:30
Kovid Goyal
379add8d6f
IntEnum was needed
2021-04-19 17:09:23 +05:30
Kovid Goyal
ea11ce8664
Use a normal enum for Dispose rather than an IntEnum
2021-04-19 16:57:43 +05:30
Kovid Goyal
271c39cc9d
Fix reading image index not working on older ImageMagick
...
Fixes #3384
2021-03-12 12:00:44 +05:30
Kovid Goyal
18186da90e
Better error message for people running icat on systems with outdated/broken ImageMagick
2021-03-12 11:28:57 +05:30
Kovid Goyal
02d29d4816
Better error message when ImageMagick does not write correct output filenames
2021-03-12 11:07:42 +05:30
Kovid Goyal
1d51fca879
Python 3.6 compat
2021-02-05 09:49:46 +05:30
Kovid Goyal
7a1785e1e8
Get chunked loading working with frames
2021-02-04 21:04:44 +05:30
Kovid Goyal
8033e9fef5
Fix error checking when rendering single frame
2021-02-04 17:16:52 +05:30
Kovid Goyal
cf3a01f502
Handle images whose first frame is smaller than the canvas
2021-02-04 15:57:49 +05:30
Kovid Goyal
3925e18964
Use rgba data for opaque animations that uses blended frames
2021-02-04 14:39:06 +05:30
Kovid Goyal
0f18fedf13
Add support for animations to icat
2021-02-04 14:18:47 +05:30
Kovid Goyal
7eba3b6cbc
Use the magick executable from IMv7 preferentially
2021-02-04 11:34:32 +05:30
Kovid Goyal
e5ef9d9062
Ensure IM outputs multiple images in rgba format
2021-02-04 11:23:54 +05:30
Kovid Goyal
55d0e23c38
...
2021-02-03 19:29:46 +05:30
Kovid Goyal
d3489712a6
Store mode data per frame
2021-02-03 18:00:36 +05:30
Kovid Goyal
56193f6902
Handle resizing of animated images with blended frames correctly
2021-02-03 17:51:38 +05:30
Kovid Goyal
9cf5348c36
Modify ImageMagick wrapper to handle animated images
2021-02-01 14:12:26 +05:30
Kovid Goyal
edf4e14e4c
Work on animation support for icat
2021-01-31 20:58:43 +05:30
Kovid Goyal
ad4665e638
Add support for newer keys to GraphicsCommand serializer
2021-01-31 20:58:42 +05:30
Kovid Goyal
65361d56c4
Use find_exe() for resolving editor as well
...
Avoids having to exec the shell in most cases
2020-12-29 11:33:42 +05:30
Kovid Goyal
08fae7a0ac
Add sbin to default paths
2020-12-29 10:50:31 +05:30
Kovid Goyal
a7e9030c12
Make finding ImageMagick a bit more robust on macOS
2020-12-29 10:48:26 +05:30
Kovid Goyal
f52c843fa2
Add support for placement id to GraphicsCommand
2020-12-02 05:35:57 +05:30
Kovid Goyal
0196920533
icat kitten: Fix display of 16-bit depth images
...
Fixes #2542
2020-04-13 23:05:10 +05:30
Kovid Goyal
eddd45bbc3
diff kitten: Fix images losing position when scrolling using mouse wheel/touchpad
2020-03-19 18:46:10 +05:30
Kovid Goyal
382c31ddf2
Use a stub rather than TYPE_CHECKING
2020-03-15 13:27:40 +05:30
Kovid Goyal
ce94a9b2df
More typing work
2020-03-11 09:35:59 +05:30
Kovid Goyal
01142cdc8c
Add type information to the Graphics Command infrastructure
2020-03-10 20:14:04 +05:30
Kovid Goyal
c817ba9eae
more typing work
2020-03-09 13:32:45 +05:30
Kovid Goyal
5730ce5f53
More typing work
2020-03-03 20:18:24 +05:30
Luflosi
5f855ce547
Use context managers to open files
...
Inspired by d50a6ddc1b .
2019-08-01 13:21:26 -05:00
Luflosi
2b095f720e
Use "with suppress()" to suppress python exceptions
...
Using
```Python
with suppress(OSError):
os.remove('somefile.tmp')
```
instead of
```Python
try:
os.remove('somefile.tmp')
except OSError:
pass
```
makes the code more compact and more readable IMO.
This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go . The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
Luflosi
a792c94ccf
Use python3 shebang for all python scripts
...
Fixes #1624 .
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
1c4f5b471d
Fix #1575
2019-04-27 07:58:07 +05:30
Kovid Goyal
8d20dbe81d
Use the ! modifier when resizing images via ImageMagick
...
Should hopefully make ImageMagick respect the specified width and height
exactly.
2018-08-01 12:03:36 +05:30
Kovid Goyal
97c317b735
Make screen_size handling in tui cleaner
...
Now screen size is fetched only for output_fd rather than sys.stdout
2018-06-06 11:20:55 +05:30
Kovid Goyal
fa3e173c18
diff kitten: Report errors converting images
2018-05-20 15:01:25 +05:30