1img-jpeg(n)                           Img                          img-jpeg(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       img-jpeg - Img, Joint Picture Expert Group format (jpeg)
9

SYNOPSIS

11       package require Tk
12
13       package require img::jpeg  ?1.4?
14
15       image create photo ?name? ?options?
16
17______________________________________________________________________________
18

DESCRIPTION

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

JPEG OPTIONS

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

SEE ALSO

81       img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
82       pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi,  img-sun,  img-tga,
83       img-tiff, img-window, img-xbm, img-xpm
84

KEYWORDS

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