Compare commits

..

No commits in common. "7c48bfb86813bd0ede3fae2d0873e1efd022b79a" and "3da370d3bd4a04822bf0a7611a55ab7eb0beff48" have entirely different histories.

2 changed files with 8 additions and 6 deletions

View file

@ -2147,11 +2147,7 @@ def get_fixed_dpi_layout_fun(fixed_dpi):
def find_scale(pagewidth, pageheight): def find_scale(pagewidth, pageheight):
"""Find the power of 10 (10, 100, 1000...) that will reduce the scale """Find the power of 10 (10, 100, 1000...) that will reduce the scale
below the PDF specification limit of 14400 PDF units (=200 inches). below the PDF specification limit of 14400 PDF units (=200 inches)"""
In principle we could also choose a scale that is not a power of 10.
We use powers of 10 because numbers in the PDF format are represented
in base-10 and using powers of 10 will thus just shift the comma and
keep the numbers easily readable by humans as well."""
from math import log10, ceil from math import log10, ceil
major = max(pagewidth, pageheight) major = max(pagewidth, pageheight)

View file

@ -2211,7 +2211,13 @@ def gif_animation_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
) )
# make sure all frames have the same palette by using -remap # make sure all frames have the same palette by using -remap
subprocess.check_call( subprocess.check_call(
CONVERT + [str(tmp_img), "-strip", "-remap", str(pal_img), str(in_img)] CONVERT
+ [
str(tmp_img),
"-strip",
"-remap", str(pal_img),
str(in_img)
]
) )
pal_img.unlink() pal_img.unlink()
tmp_img.unlink() tmp_img.unlink()