1img-jpeg(n)                           Img                          img-jpeg(n)
2
3
4

NAME

6       img-jpeg - Img, Joint Picture Expert Group format (jpeg)
7

SYNOPSIS

9       package require Tk
10
11       package require img::jpeg  ?1.4?
12
13       image create photo ?name? ?options?
14
15

DESCRIPTION

17       The  package  img::jpeg  is a sub-package of Img. It can be loaded as a
18       part of the complete Img support, via package require Img,  or  on  its
19       own, via package require img::jpeg.
20
21       Like  all packages of Img it does not provide new commands, but extends
22       the existing Tk command image so  that  it  supports  files  containing
23       raster  images  in  the  Joint Picture Expert Group format (jpeg). More
24       specifically img::jpeg extends Tk's photo image type.
25
26       The name of the new format handler is jpeg.  This handler provides  new
27       additional  configuration  options.  See  section JPEG OPTIONS for more
28       detailed explanations.
29
30       All of the above means that in a call like
31
32       image create photo ?name? ?options?
33
34       [1]    Image data in jpeg format (options -data and -file) is  detected
35              automatically.
36
37       [2]    The  format  name  jpeg is recognized by the option -format.  In
38              addition the value for the option is treated  as  list  and  may
39              contain  any  of  the  special  options  listed  in section JPEG
40              OPTIONS.
41

JPEG OPTIONS

43       The handler provides six options, two effective  when  reading  from  a
44       JPEG  image,  and  five  influencing the writing of such. One option is
45       usable for both reading an writing.
46
47       -fast  This option is for reading from JPEG data. It usage activates  a
48              processing  mode which is fast, but also provides only low-qual‐
49              ity information.
50
51       -grayscale
52              This option can be used for both reading  and  writing  of  JPEG
53              data.  Usage of this option forces incoming images to grayscale,
54              and written images will be monochrome.
55
56       -quality n
57              This option is for writing JPEG data. It specifies the  compres‐
58              sion  level as a quality percentage. The higher the quality, the
59              less the compression. The nominal range for n is 0...100. Useful
60              values are in the range 5...95. The default value is 75.
61
62       -smooth n
63              This  option is for writing JPEG data. When used the writer will
64              smooth the image before performing the  compression.  Values  in
65              the 10...30 are usually enough. The default is 0, i.e no smooth‐
66              ing.
67
68       -optimize
69              This option is for writing JPEG data. It usage causes the writer
70              to  optimize  the  huffman table used to encode the jpeg coeffi‐
71              cients.
72
73       -progressive
74              This option is for writing JPEG data. It usage causes  the  cre‐
75              ation of a progressive JPEG file.
76

SEE ALSO

78       img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
79       pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi,  img-sun,  img-tga,
80       img-tiff, img-window, img-xbm, img-xpm
81

KEYWORDS

83       image handling, jpeg, tk
84
86       Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net>
87
88
89
90
91img-jpeg                              1.4                          img-jpeg(n)
Impressum