Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "non-zero" consistently #7695

Merged
merged 1 commit into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tests/test_file_eps.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def test_render_scale1():
image1_scale1_compare.load()
assert_image_similar(image1_scale1, image1_scale1_compare, 5)

# Non-Zero bounding box
# Non-zero bounding box
with Image.open(FILE2) as image2_scale1:
image2_scale1.load()
with Image.open(FILE2_COMPARE) as image2_scale1_compare:
Expand All @@ -292,7 +292,7 @@ def test_render_scale2():
image1_scale2_compare.load()
assert_image_similar(image1_scale2, image1_scale2_compare, 5)

# Non-Zero bounding box
# Non-zero bounding box
with Image.open(FILE2) as image2_scale2:
image2_scale2.load(scale=2)
with Image.open(FILE2_COMPARE_SCALE2) as image2_scale2_compare:
Expand Down
2 changes: 1 addition & 1 deletion Tests/test_image_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def test_reduce(self):
if px[2, 0] != test_color // 2:
assert test_color // 2 == px[2, 0]

def test_nonzero_coefficients(self):
def test_non_zero_coefficients(self):
# regression test for the wrong coefficients calculation
# due to bug https://github.com/python-pillow/Pillow/issues/2161
im = Image.new("RGBA", (1280, 1280), (0x20, 0x40, 0x60, 0xFF))
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/GifEncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int glzwe(GIFENCODERSTATE *st, const UINT8 *in_ptr, UINT8 *out_ptr,
st->head = st->codes[st->probe] >> 20;
goto encode_loop;
} else {
/* Reprobe decrement must be nonzero and relatively prime to table
/* Reprobe decrement must be non-zero and relatively prime to table
* size. So, any odd positive number for power-of-2 size. */
if ((st->probe -= ((st->tail << 2) | 1)) < 0) {
st->probe += TABLE_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/Jpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct {
/* Optimize Huffman tables (slow) */
int optimize;

/* Disable automatic conversion of RGB images to YCbCr if nonzero */
/* Disable automatic conversion of RGB images to YCbCr if non-zero */
int keep_rgb;

/* Stream type (0=full, 1=tables only, 2=image only) */
Expand Down
Loading