[latex3-commits] [l3svn] branch master updated: Support for bitmap interpolation
noreply at latex-project.org
noreply at latex-project.org
Thu May 18 12:45:24 CEST 2017
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
The following commit(s) were added to refs/heads/master by this push:
new f3d07a5 Support for bitmap interpolation
f3d07a5 is described below
commit f3d07a5ba33a8e58fffb9135db43b63b7c5539a1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu May 18 11:45:02 2017 +0100
Support for bitmap interpolation
---
l3kernel/l3drivers.dtx | 23 +++++++++++++++++++----
l3trial/l3image/l3image.dtx | 16 +++++++++++++---
2 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 16d1704..3e80610 100644
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -721,12 +721,17 @@
{
\int_zero:N \l__image_page_int
\tl_clear:N \l__image_pagebox_tl
- \tl_clear:N \l_@@_image_attr_tl
+ \tl_set:Nx \l_@@_image_attr_tl
+ {
+ \bool_if:NT \l__image_interpolate_bool
+ { :I }
+ }
\@@_image_getbb_auxi:n {#1}
}
\cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
\cs_new_protected:Npn \@@_image_getbb_pdf:n #1
{
+ \bool_set_false:N \l__image_interpolate_bool
\tl_set:Nx \l_@@_image_attr_tl
{
\int_compare:nNnT \l__image_page_int > 0
@@ -750,6 +755,8 @@
\cs_new_protected:Npn \@@_image_getbb_auxii:n #1
{
\tex_immediate:D \pdftex_pdfximage:D
+ \bool_if:NT \l__image_interpolate_bool
+ { /Interpolate~true }
\int_compare:nNnT \l__image_page_int > 0
{ page ~ \int_use:N \l__image_page_int }
\tl_if_empty:NF \l__image_pagebox_tl
@@ -938,14 +945,18 @@
% \begin{macrocode}
\cs_new_eq:NN \@@_image_getbb_eps:n \__image_read_bb:n
%<*dvipdfmx>
-\cs_new_protected:Npn \@@_image_getbb_jpg:n
+\cs_new_protected:Npn \@@_image_getbb_jpg:n #1
{
\int_zero:N \l__image_page_int
\tl_clear:N \l__image_pagebox_tl
- \__image_extract_bb:n
+ \__image_extract_bb:n {#1}
}
\cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
-\cs_new_eq:NN \@@_image_getbb_pdf:n \__image_extract_bb:n
+\cs_new_protected:Npn \@@_image_getbb_pdf:n #1
+ {
+ \bool_set_false:N \l__image_interpolate_tl
+ \__image_extract_bb:n {#1}
+ }
%</dvipdfmx>
% \end{macrocode}
% \end{macro}
@@ -990,6 +1001,8 @@
{ :P \int_use:N \l__image_page_int }
\tl_if_empty:NF \l__image_pagebox_tl
{ : \l__image_pagebox_tl }
+ \bool_if:NT \l__image_interpolate_bool
+ { :I }
}
{#1} {#2}
}
@@ -1016,6 +1029,8 @@
\tl_if_empty:NF \l__image_pagebox_tl
{ pagebox ~ \l__image_pagebox_tl \c_space_tl }
(#1)
+ \bool_if:NT \l__image_interpolate_bool
+ { <</Interpolate~true>> }
}
}
% \end{macrocode}
diff --git a/l3trial/l3image/l3image.dtx b/l3trial/l3image/l3image.dtx
index f551a45..b7bb353 100644
--- a/l3trial/l3image/l3image.dtx
+++ b/l3trial/l3image/l3image.dtx
@@ -52,6 +52,10 @@
%
% \section{\pkg{l3image} documentation}
%
+% \begin{variable}{interpolate}
+% Indicates whether interpolation should be applied to bitmap image files.
+% \end{variable}
+%
% \begin{variable}{page}
% The page number of an image to be used when including a multi-page image
% file. The value should be a positive integer.
@@ -71,6 +75,10 @@
% which in themselves contain no driver-specific code. This functionality
% is made available here.
%
+% \begin{variable}[int]{\l__image_interpolate_bool}
+% Indicates whether interpolation should be applied to bitmap image files.
+% \end{variable}
+%
% \begin{variable}[int]{\l__image_page_int}
% The page to extract from a multi-page image file: used for |.pdf| files
% which may contain multiple pages.
@@ -168,15 +176,17 @@
%
% \subsection{Image feature support}
%
-% \begin{macro}[int]{\l__image_page_int, \l__image_pagebox_tl}
+% \begin{macro}[int]
+% {\l__image_interpolate_bool, \l__image_page_int, \l__image_pagebox_tl}
% Keys which control features of images. The somewhat odd order for
% |pagebox| matches that in the \pdfTeX{} manual (where the choices all
% have numerical values).
% \begin{macrocode}
\keys_define:nn { image }
{
- page .int_set:N = \l__image_page_int ,
- pagebox .choices:nn =
+ interpolate .bool_set:N = \l__image_interpolate_bool,
+ page .int_set:N = \l__image_page_int ,
+ pagebox .choices:nn =
{ artbox, bleedbox , mediabox , trimbox }
{ \tl_set:Nn \l__image_pagebox_tl {#1} } ,
pagebox / cropbox .code:n = { \tl_clear:N \l__image_pagebox_tl }
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list