Debian Codegraph @

texmf-dist/tex/latex/oberdiek/bmpsize-test.tex

raw
1 %%
2 %% This is file `bmpsize-test.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% bmpsize.dtx (with options: `test')
8 %%
9 %% This is a generated file.
10 %%
11 %% Project: bmpsize
12 %% Version: 2019/12/29 v1.8
13 %%
14 %% Copyright (C)
15 %% 2006-2009 Heiko Oberdiek
16 %% 2016-2019 Oberdiek Package Support Group
17 %%
18 %% This work may be distributed and/or modified under the
19 %% conditions of the LaTeX Project Public License, either
20 %% version 1.3c of this license or (at your option) any later
21 %% version. This version of this license is in
22 %% https://www.latex-project.org/lppl/lppl-1-3c.txt
23 %% and the latest version of this license is in
24 %% https://www.latex-project.org/lppl.txt
25 %% and version 1.3 or later is part of all distributions of
26 %% LaTeX version 2005/12/01 or later.
27 %%
28 %% This work has the LPPL maintenance status "maintained".
29 %%
30 %% The Current Maintainers of this work are
31 %% Heiko Oberdiek and the Oberdiek Package Support Group
32 %% https://github.com/ho-tex/oberdiek/issues
33 %%
34 %%
35 %% This work consists of the main source file bmpsize.dtx
36 %% and the derived files
37 %% bmpsize.sty, bmpsize.pdf, bmpsize.ins, bmpsize.drv,
38 %% bmpsize-base.sty, bmpsize-test.tex, bmpsize-dvips.def,
39 %% bmpsize-dvipdfm.def, bmpsize-dvipdfmx.def.
40 %%
41 \expandafter\ifx\csname NeedsTeXFormat\endcsname\relax
42 \input miniltx\relax
43 \fi
44 \begingroup\expandafter\expandafter\expandafter\endgroup
45 \expandafter\ifx\csname pdfoutput\endcsname\relax
46 \else
47 \pdfoutput=0 %
48 \fi
49 \RequirePackage{bmpsize}
50
51 \endlinechar=-1
52 \catcode`\@=11
53 \def\msg#{\immediate\write16}
54
55 \def\init{%
56 \msg{}%
57 \msg{File name menu}%
58 \msg{==============}%
59 \msg{* Option menu: use `opt' as file name}%
60 \msg{* Quit program: <return>}%
61 \msg{}%
62 \message{Image file name = }%
63 \read-1 to \imagename
64 \ifx\imagename\@empty
65 \expandafter\@firstoftwo
66 \else
67 \expandafter\@secondoftwo
68 \fi
69 {%
70 \csname @@end\endcsname
71 \end
72 }{%
73 \ifnum\pdf@strcmp{\imagename}{opt}=\z@
74 \expandafter\optionmenu
75 \else
76 \startimg
77 \expandafter\init
78 \fi
79 }%
80 }
81 \def\optionmenu{%
82 \msg{}%
83 \msg{Option menu}%
84 \msg{===========}%
85 \msg{Current setting:}%
86 \msg{* bmpsizefast = \if@bmpsize@fast true\else false\fi}%
87 \msg{* \if@bmpsize@user@resolution\else default\fi resolution = %
88 \bmpsize@pixelx@default
89 \space
90 \bmpsize@pixely@default
91 }%
92 \msg{* \if@bmpsize@user@resolution default\fi resolution: not set}%
93 \msg{* resolutionunit = \bmpsize@unit@default}%
94 \msg{* Quit option menu: <return>}%
95 \msg{}%
96 \message{Options = }%
97 \read-1 to \options
98 \ifx\options\empty
99 \expandafter\init
100 \else
101 \edef\@bmpsize@temp{%
102 \noexpand\setkeys{Gin}{\options}%
103 }%
104 \@bmpsize@temp
105 \expandafter\optionmenu
106 \fi
107 }
108
109 \def\startimg{%
110 \let\@found\@empty
111 \msg{}%
112 \msg{* File [\imagename]}%
113 \@for\@type:=\bmpsize@types\do{%
114 \ifx\@found\@empty
115 \csname bmpsize@read@\@type\endcsname\imagename
116 \ifbmpsize@ok
117 \let\@found\@type
118 \msg{\space\space Type: \@type}%
119 \msg{\space\space Pixel width: \bmpsize@pixelwidth\space px}%
120 \msg{\space\space Pixel height: \bmpsize@pixelheight\space px}%
121 \ifx\bmpsize@pixelx\relax
122 \else
123 \ifx\bmpsize@unit\relax
124 \let\@unit@spec\@empty
125 \def\@ratio@name{Ratio }%
126 \else
127 \def\@unit@spec{\space dots per \bmpsize@unit}%
128 \def\@ratio@name{Density }%
129 \fi
130 \msg{\space\space \@ratio@name x: \bmpsize@pixelx\@unit@spec}%
131 \msg{\space\space \@ratio@name y: \bmpsize@pixely\@unit@spec}%
132 \fi
133 \msg{\space\space Width: \bmpsize@width\space bp}%
134 \msg{\space\space Height: \bmpsize@height\space bp}%
135 \ifx\bmpsize@orientation\relax
136 \else
137 \msg{\space\space Orientation: \bmpsize@orientation}%
138 \fi
139 \fi
140 \fi
141 }%
142 \ifx\@found\@empty
143 \edef\@file@date{\pdf@filemoddate{\imagename}}%
144 \ifx\@file@date\@empty
145 \msg{\space\space --> File not found <--}%
146 \else
147 \msg{\space\space --> Unknown image type <--}%
148 \fi
149 \fi
150 }
151
152 \ifx\noinit!\else\expandafter\init\fi
153 \endinput
154 %%
155 %% End of file `bmpsize-test.tex'.