Andrew Murray
9430bbe5a1
Added DXT5 saving
2025-03-17 07:55:24 +11:00
Andrew Murray
3dbd0e57ba
Added DXT1 encoding
2025-03-17 07:55:24 +11:00
Andrew Murray
92cc9bf902
Support reading grayscale images with 4 channels
2025-03-03 08:46:20 +11:00
Andrew Murray
f598c03233
Removed unused file
2025-01-29 17:33:55 +11:00
Aleksandr Karpinskii
849768df7a
Remove unused declaration
2025-01-28 20:40:43 +11:00
Hugo van Kemenade
01792cbff0
Merge pull request #8652 from radarhere/tile
2025-01-08 19:03:31 +02:00
Hugo van Kemenade
6bce9aa461
Merge pull request #8645 from radarhere/mozjpeg
2025-01-08 18:44:21 +02:00
Andrew Murray
73a383fa72
Use rawmode instead of splitting and merging
2025-01-05 06:11:54 +11:00
Andrew Murray
ae59b03956
Do not use MozJPEG progressive default
2024-12-31 21:44:57 +11:00
Andrew Murray
f91b111fac
Removed pre-C99 definitions
2024-12-31 20:42:49 +11:00
Andrew Murray
ea962bf1d8
Added RGBX;16N to RGB unpacker
2024-12-29 16:59:32 +11:00
Andrew Murray
973cd6481a
Merge branch 'main' into jpeg2000_cmyk_save
2024-12-28 22:08:08 +11:00
Andrew Murray
05c981ffd7
Removed buffer_size variable
2024-12-28 15:41:19 +11:00
Andrew Murray
439d5cf2a0
Merge branch 'main' into jpeg2000_cmyk_save
2024-12-28 07:42:56 +11:00
Andrew Murray
fb3d80e390
Fixed connecting discontiguous corners
2024-12-24 00:41:27 +11:00
Andrew Murray
522505b714
Support saving CMYK JPEG2000 images
2024-12-10 18:33:12 +11:00
Andrew Murray
7edf952832
Do not close provided file handles with libtiff
2024-10-11 19:37:56 +11:00
Andrew Murray
7777260b6b
Merge pull request #8438 from radarhere/filter
2024-10-10 21:50:51 +11:00
pre-commit-ci[bot]
a609d65b33
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-10-07 17:56:23 +00:00
Hugo van Kemenade
535bf234c3
Merge pull request #8341 from uploadcare/use-ptr
...
Use ImagingCore.ptr instead of ImagingCore.id
2024-10-07 13:37:44 +03:00
Alexander Karpinsky
8e332eb3b0
Apply suggestions from code review
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-10-07 13:05:13 +04:00
Andrew Murray
418ae7caa2
Support BuiltinFilter for I;16* images
2024-10-05 01:12:51 +10:00
Hugo van Kemenade
c9c8d45898
Merge pull request #8422 from radarhere/resize_i16
2024-10-01 13:55:13 +03:00
Hugo van Kemenade
ea15e0e622
Merge pull request #8413 from radarhere/sgirle_memory
2024-10-01 13:52:22 +03:00
Hugo van Kemenade
747fdf5069
Merge pull request #8402 from radarhere/sgirle
2024-10-01 13:52:08 +03:00
Andrew Murray
42ad42c174
Merge branch 'main' into resize_i16
2024-09-30 19:50:26 +10:00
Andrew Murray
851449edfc
Free memory on early return
2024-09-30 19:49:13 +10:00
Andrew Murray
fc65e437cf
Prevent division by zero
2024-09-30 19:48:53 +10:00
Andrew Murray
cc0b6b9de9
Cast int before potentially exceeding INT_MAX
2024-09-30 19:47:52 +10:00
Andrew Murray
04a00d273c
Support all resampling filters when resizing I;16* images
2024-09-28 14:27:40 +10:00
Andrew Murray
e57da68190
Check image value before use
2024-09-20 19:20:53 +10:00
pre-commit-ci[bot]
9424b1a892
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-09-19 19:59:15 +00:00
PavlNekrasov
46f2fa17be
fix dereference before checking for NULL in the ImagingTransformAffine function
...
The `imIn` pointer is checked for `NULL`, but it seems to be dereferenced before this check. You must first make sure that the pointer is not `NULL` before using it.
2024-09-19 22:53:45 +03:00
Alexander Karpinsky
af521a1ce1
Merge branch 'main' into use-ptr
2024-09-18 22:24:46 +02:00
Aleksandr Karpinskii
4a284a78c5
Remove weird comments
2024-09-11 20:40:46 +10:00
Andrew Murray
63f398bc12
Merge pull request #8194 from uploadcare/optimize-getbbox
...
Optimize getbbox() and getextrema() routines
2024-09-09 15:08:11 +10:00
Aleksandr Karpinskii
5428e3568e
Deprecate ImageCore.id and ImageCore.unsafe_ptrs
2024-09-08 17:30:23 +04:00
Aleksandr Karpinskii
7f48567002
Use s# in PyArg_ParseTuple
2024-09-08 17:30:23 +04:00
Hugo van Kemenade
a838da7406
Merge pull request #8002 from Yay295/patch-1
...
Use (void) for empty function parameters
2024-09-07 08:37:50 +03:00
Andrew Murray
a6ca45aea6
Use (void) to indicate no parameters
2024-09-07 00:01:25 -05:00
Andrew Murray
1270043682
Return early if either width or height is zero
2024-09-05 15:46:54 +10:00
Andrew Murray
55f49393af
Treat unknown colorspace as unspecified
2024-09-03 09:55:06 +10:00
Yay295
0c335d239b
use (void) for empty function parameters
2024-08-28 08:08:08 -05:00
Andrew Murray
e4e2cd6564
Updated comments
2024-08-14 15:28:34 +04:00
Andrew Murray
2b6c5a27a1
Added braces
2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
8256b9bb7f
Correct left boundary on the second stage
2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
5fb44ab694
This check is useless, since moved after the first stage
2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
6a87df2c1f
clang-format
2024-08-14 15:28:34 +04:00
Aleksandr Karpinskii
4cf5688cfd
Optimize getbbox() and getextrema()
2024-08-14 15:28:34 +04:00
Andrew Murray
70298d3be9
Fix undefined variable
2024-08-07 06:38:46 +10:00
Andrew Murray
5e8dbbbf9e
Removed unused variable
2024-08-06 13:32:46 +10:00
Alexander Karpinsky
d8447de24d
Merge pull request #8211 from uploadcare/remove-c-flags
...
Remove all WITH_* flags from _imaging.c and other flags
2024-08-02 16:10:10 +04:00
Aleksandr Karpinskii
d00fb87fa3
Rename Not NO_OUTPUT to DEBUG, remove TEST_MERGESORT and TEST_SPLIT* flags
2024-07-28 16:46:28 +04:00
Aleksandr Karpinskii
dc53356c1a
Not needed since memcpy is used here
2024-07-28 16:24:51 +04:00
pre-commit-ci[bot]
aa8d87696b
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-07-19 12:14:54 +00:00
Lysandros Nikolaou
8a54f58ac6
Merge branch 'main' into arena-thread-safe
2024-07-19 14:14:23 +02:00
Lysandros Nikolaou
06767fc325
Address feedback; do not lock in a loop
2024-07-16 17:00:14 +02:00
Lysandros Nikolaou
5999b9b0cc
Initialize PyMutex only under the free-threaded build
2024-07-16 16:56:15 +02:00
pre-commit-ci[bot]
9f110aa702
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-07-16 14:47:15 +00:00
Lysandros Nikolaou
ea7b5c5b66
Lock around usages of imaging memory arenas
2024-07-16 16:43:49 +02:00
pre-commit-ci[bot]
2973b041c7
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-07-16 12:58:04 +00:00
Andrew Murray
6ee41897e2
Added dedicated unpacker for inverted alpha
2024-06-25 17:29:06 -05:00
Hugo van Kemenade
a596a4063d
Merge pull request #8112 from radarhere/i16_mask
2024-06-25 06:50:47 -06:00
Hugo van Kemenade
bbf879641d
Merge pull request #7997 from radarhere/rgbx
2024-06-25 05:28:50 -06:00
Andrew Murray
08b5a2e9a7
Corrected using a 1 mode mask with I;16* images
2024-06-08 14:35:10 +10:00
Andrew Murray
82910a5e4f
Lint fixes
2024-05-19 22:00:45 +10:00
Andrew Murray
22b64ffcf2
Merge pull request #8015 from hugovk/pre-commit-clang
...
Add ClangFormat to pre-commit
2024-05-19 16:27:30 +10:00
Andrew Murray
3062ec4dd2
Fix type errors
2024-05-16 22:55:03 +10:00
Andrew Murray
7d62c306cc
Merge branch 'main' into pre-commit-clang
2024-04-30 21:34:41 +10:00
Andrew Murray
996c053d89
Change comment style
2024-04-28 22:49:56 +10:00
Hugo van Kemenade
5597f618a3
Change comment style
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-04-28 02:49:42 -06:00
Andrew Murray
fd8c6a6295
Do not indent goto labels
2024-04-28 13:51:32 +10:00
Hugo van Kemenade
1138ea5370
Merge pull request #7921 from Yay295/testing
...
Fix ImagingAccess for I;16N on big-endian
2024-04-25 21:36:38 +03:00
pre-commit-ci[bot]
617e7295a8
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-04-25 12:51:24 +00:00
Hugo van Kemenade
1fc1179ed5
Merge pull request #8008 from radarhere/convert
...
Simplified RGB to I;16, I;16L and I;16B conversion
2024-04-25 00:00:15 +03:00
Andrew Murray
46b85e6ab4
Simplified code
2024-04-24 11:02:56 +10:00
Yay295
eee53ba664
extract band count check
2024-04-23 13:06:22 -05:00
Andrew Murray
bb2411dd01
Support reading P mode TIFF images with padding
2024-04-22 08:11:45 +10:00
Andrew Murray
98a0515494
Read images as RGB, rather than RGBX
2024-04-22 08:05:59 +10:00
Yay295
da7198c987
fix ImagingAccess for I;16N on big-endian
2024-04-20 09:01:38 -05:00
Andrew Murray
22705d3da5
Merge pull request #7956 from Cirras/obscure-bitmap-headers
...
Add support for reading `BITMAPV2INFOHEADER` and `BITMAPV3INFOHEADER`
2024-04-13 16:25:26 +10:00
Yay295
82b7b8a9ee
Fix some comments
2024-04-11 00:29:31 -05:00
Andrew Murray
98ae91a65d
Added BGXR and BGAR unpackers
2024-04-09 00:45:48 +10:00
Andrew Murray
c61a481028
Support reading CMYK JPEG2000 images
2024-04-06 13:40:39 +11:00
Hugo van Kemenade
7b2320b50f
Fix typos
2024-03-31 15:57:20 +03:00
Andrew Murray
838bb6c493
Added RGB to I;16N conversion
2024-03-30 20:22:50 +11:00
Andrew Murray
fb6b860172
Added RGB to I;16, I;16L and I;16B conversion
2024-03-30 11:33:55 +11:00
Hugo van Kemenade
d734c8b702
Merge pull request #7888 from radarhere/convert_rgb
2024-03-28 18:11:12 +02:00
Andrew Murray
e79d1746f2
Support conversion from RGB to La
2024-03-26 19:57:17 +11:00
Andrew Murray
ab8f465f1a
Use transparency info when converting from RGB to LA
2024-03-26 19:55:22 +11:00
Andrew Murray
171e497e05
Raise ValueError if kmeans is negative
2024-03-22 17:36:04 +11:00
Andrew Murray
8b6a182815
Support conversion from RGB to RGBa
2024-03-21 16:25:40 +11:00
Andrew Murray
f128d47e15
Added reading of JPEG2000 palettes
2024-03-12 19:30:23 +11:00
Richard Barnes
38cec87c93
Fix shift-sign issue in Convert.c ( #7838 )
...
* Fix shift-sign issue in Convert.c
Fixes
```
libImaging/Convert.c:513:25: error: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Werror,-Wshift-sign-overflow]
UINT32 trns = (0xff << 24) | ((b & 0xff) << 16) | ((g & 0xff) << 8) | (r & 0xff);
~~~~ ^ ~~
```
---------
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-03-09 17:52:00 +11:00
Andrew Murray
d6a3f89e27
Open 16-bit grayscale PNGs as I;16
2024-03-02 15:39:43 +11:00
Andrew Murray
2d6ad5868d
Use "non-zero" consistently
2024-01-06 12:07:55 +11:00
Benjamin Gilbert
a5fab5fc0b
Fail if chroma subsampling selected when writing RGB JPEG
...
The user presumably doesn't intend to subsample the green and blue
channels.
2023-12-26 12:37:35 -06:00
Benjamin Gilbert
4b422db243
Add keep_rgb option to prevent RGB -> YCbCr conversion during JPEG write
...
libjpeg automatically converts RGB to YCbCr by default. Add a keep_rgb
option to disable libjpeg's automatic conversion of RGB images during
write.
2023-12-13 18:26:35 -06:00
Andrew Murray
4b308dc2bf
Merge pull request #7488 from bgilbert/jpeg-restart
...
Allow configuring JPEG restart marker interval on save
2023-11-14 23:42:50 +11:00
Hugo van Kemenade
556dd1e15c
Merge pull request #7535 from hugovk/add-3.13
2023-11-12 00:34:12 +02:00