2011-03-30 13:49:47 +00:00
|
|
|
.TH JPG 1
|
|
|
|
.SH NAME
|
2013-07-19 06:16:43 +00:00
|
|
|
jpg, gif, png, tif, ppm, bmp, v210, yuv, ico, tga, tojpg, togeordi, togif, toppm, topng, totif, toico \- view and convert pictures
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B jpg
|
|
|
|
[
|
2013-08-31 17:39:51 +00:00
|
|
|
.B -39cdefFkJrtvy
|
2011-03-30 13:49:47 +00:00
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B gif
|
|
|
|
[
|
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B png
|
|
|
|
[
|
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
2013-07-02 05:57:14 +00:00
|
|
|
.B tif
|
|
|
|
[
|
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
2011-03-30 13:49:47 +00:00
|
|
|
.B ppm
|
|
|
|
[
|
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B bmp
|
|
|
|
[
|
2013-04-12 22:36:22 +00:00
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B v210
|
|
|
|
[
|
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
2011-08-26 09:12:52 +00:00
|
|
|
.B tga
|
|
|
|
[
|
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.br
|
2011-03-30 13:49:47 +00:00
|
|
|
.B yuv
|
|
|
|
[
|
2013-04-12 22:36:22 +00:00
|
|
|
.B -39cdektv
|
|
|
|
] [
|
|
|
|
.I file ...
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
.PP
|
2013-05-27 01:56:56 +00:00
|
|
|
.B tojpg
|
|
|
|
[
|
|
|
|
.B -c
|
|
|
|
.I comment
|
|
|
|
] [
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -ks
|
2013-05-27 01:56:56 +00:00
|
|
|
] [
|
|
|
|
.I file
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B togeordi
|
|
|
|
[
|
|
|
|
.B -c
|
|
|
|
.I comment
|
|
|
|
] [
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -k
|
2013-05-27 01:56:56 +00:00
|
|
|
] [
|
|
|
|
.I file
|
|
|
|
]
|
|
|
|
.br
|
2011-03-30 13:49:47 +00:00
|
|
|
.B togif
|
|
|
|
[
|
|
|
|
.B -c
|
|
|
|
.I comment
|
|
|
|
] [
|
|
|
|
.B -l
|
|
|
|
.I loopcount
|
|
|
|
] [
|
|
|
|
.B -d
|
|
|
|
.I msec
|
|
|
|
] [
|
|
|
|
.B -t
|
|
|
|
.I transindex
|
|
|
|
] [
|
|
|
|
.I file ...
|
|
|
|
[
|
|
|
|
.B -d
|
|
|
|
.I msec
|
|
|
|
]
|
|
|
|
.I file ...
|
2016-06-10 10:14:02 +00:00
|
|
|
|
|
|
|
|
.B -E
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B toppm
|
|
|
|
[
|
|
|
|
.B -c
|
|
|
|
.I comment
|
|
|
|
] [
|
2013-05-12 20:11:43 +00:00
|
|
|
.B -r
|
|
|
|
] [
|
2011-03-30 13:49:47 +00:00
|
|
|
.I file
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B topng
|
|
|
|
[
|
|
|
|
.B -c
|
|
|
|
.I comment
|
|
|
|
] [
|
|
|
|
.B -g
|
|
|
|
.I gamma
|
|
|
|
] [
|
|
|
|
.I file
|
|
|
|
]
|
2013-07-19 06:16:43 +00:00
|
|
|
.br
|
|
|
|
.B totif
|
|
|
|
[
|
|
|
|
.B -c
|
|
|
|
.I comment
|
|
|
|
] [
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -3bgGhklLptvyY
|
2013-07-19 06:16:43 +00:00
|
|
|
] [
|
|
|
|
.I file
|
|
|
|
]
|
2011-03-30 13:49:47 +00:00
|
|
|
.PP
|
|
|
|
.B ico
|
|
|
|
[
|
2012-04-01 02:57:11 +00:00
|
|
|
.B -c
|
|
|
|
] [
|
2011-03-30 13:49:47 +00:00
|
|
|
.I file
|
|
|
|
]
|
|
|
|
.br
|
|
|
|
.B toico
|
|
|
|
[
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
These programs read, display, and write image files in public formats.
|
|
|
|
.IR Jpg ,
|
|
|
|
.IR gif ,
|
|
|
|
.IR png ,
|
2013-07-02 05:57:14 +00:00
|
|
|
.IR tif ,
|
2011-03-30 13:49:47 +00:00
|
|
|
.IR ppm ,
|
|
|
|
.IR bmp ,
|
2011-08-26 09:12:52 +00:00
|
|
|
.IR tga ,
|
2011-03-30 13:49:47 +00:00
|
|
|
.IR v210 ,
|
|
|
|
and
|
|
|
|
.IR yuv
|
|
|
|
read files in the corresponding formats and, by default, display
|
|
|
|
them in the current window; options cause them instead to convert the images
|
|
|
|
to Plan 9 image format and write them to standard output.
|
2013-05-27 01:56:56 +00:00
|
|
|
.IR Tojpg ,
|
|
|
|
.IR togif ,
|
2013-05-12 20:11:43 +00:00
|
|
|
.IR toppm ,
|
2013-07-19 06:16:43 +00:00
|
|
|
.IR topng ,
|
2011-03-30 13:49:47 +00:00
|
|
|
and
|
2013-07-19 06:16:43 +00:00
|
|
|
.I totif
|
|
|
|
read Plan 9 images files, convert them to JPEG, GIF, PPM,
|
|
|
|
PNG, or TIFF and write them to standard output.
|
2011-03-30 13:49:47 +00:00
|
|
|
.PP
|
|
|
|
The default behavior of
|
|
|
|
.IR jpg ,
|
|
|
|
.IR gif ,
|
2013-07-02 05:57:14 +00:00
|
|
|
.IR png ,
|
|
|
|
.IR tif ,
|
|
|
|
.IR ppm ,
|
|
|
|
.IR bmp ,
|
|
|
|
.IR tga ,
|
|
|
|
.IR v210 ,
|
2011-03-30 13:49:47 +00:00
|
|
|
and
|
2013-07-02 05:57:14 +00:00
|
|
|
.IR yuv
|
2011-03-30 13:49:47 +00:00
|
|
|
is to display the
|
|
|
|
.IR file ,
|
|
|
|
or standard input if no file is named.
|
|
|
|
Once a file is displayed, typing a character causes the program to display the next image.
|
|
|
|
Typing a
|
|
|
|
.BR q ,
|
|
|
|
DEL, or control-D exits the program.
|
|
|
|
For a more user-friendly interface, use
|
|
|
|
.IR page (1),
|
|
|
|
which invokes these programs to convert the images to standard format,
|
|
|
|
displays them, and offers scrolling, panning, and menu-driven navigation among the files.
|
|
|
|
.PP
|
|
|
|
These programs share many options:
|
|
|
|
.TP
|
|
|
|
.B -e
|
|
|
|
Disable Floyd-Steinberg error diffusion, which is used to improve the appearance
|
|
|
|
of images on color-mapped displays, typically with 8 bits per pixel.
|
|
|
|
Primarily useful for debugging; if the display has true RGB color, the image
|
|
|
|
will be displayed in full glory.
|
|
|
|
.TP
|
|
|
|
.B -k
|
|
|
|
Convert and display the image as a black and white (really grey-scale) image.
|
|
|
|
.TP
|
|
|
|
.B -v
|
|
|
|
Convert the image to an RGBV color-mapped image, even if the
|
|
|
|
display has true RGB color.
|
|
|
|
.TP
|
|
|
|
.B -d
|
|
|
|
Suppress display of the image; this is set automatically by
|
|
|
|
any of the following options:
|
|
|
|
.TP
|
|
|
|
.B -c
|
|
|
|
Convert the image to a Plan 9 representation, as defined by
|
|
|
|
.IR image (6),
|
|
|
|
and write it to standard output.
|
|
|
|
.TP
|
|
|
|
.B -9
|
|
|
|
Like
|
|
|
|
.BR -c ,
|
|
|
|
but produce an uncompressed image.
|
|
|
|
This saves processing time, particularly when the output is
|
|
|
|
being piped to another program such as
|
|
|
|
.IR page (1),
|
|
|
|
since it avoids compression and decompression.
|
|
|
|
.TP
|
|
|
|
.B -t
|
|
|
|
Convert the image, if it is in color, to a true color RGB image.
|
|
|
|
.TP
|
|
|
|
.B -3
|
|
|
|
Like
|
|
|
|
.BR -t ,
|
|
|
|
but force the image to RGB even if it is originally grey-scale.
|
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
.I Jpg
|
|
|
|
has two extra options used to process the output of the LML
|
|
|
|
video card:
|
|
|
|
.TP
|
|
|
|
.B -f
|
|
|
|
Merge two adjacent images, which represent the two fields of a video picture,
|
|
|
|
into a single image.
|
|
|
|
.TP
|
|
|
|
.B -F
|
|
|
|
The input is a motion JPEG file, with multiple images representing frames of the movie. Sets
|
|
|
|
.BR -f .
|
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
The
|
2013-05-27 01:56:56 +00:00
|
|
|
.IR tojpg ,
|
2013-07-02 05:57:14 +00:00
|
|
|
.IR togif ,
|
2011-03-30 13:49:47 +00:00
|
|
|
.IR toppm
|
2013-07-02 05:57:14 +00:00
|
|
|
and
|
|
|
|
.IR topng
|
|
|
|
programs go the other way: they convert from Plan 9 images to JPEG, GIF,
|
2013-07-19 06:16:43 +00:00
|
|
|
PPM, PNG, and TIFF and have no display capability.
|
2013-05-27 01:56:56 +00:00
|
|
|
They all accept an option
|
2011-03-30 13:49:47 +00:00
|
|
|
.B -c
|
|
|
|
to set the comment field of the resulting file.
|
2013-05-12 20:11:43 +00:00
|
|
|
The
|
|
|
|
.B -r
|
|
|
|
option makes
|
|
|
|
.I toppm
|
|
|
|
output raw PPM.
|
|
|
|
The default is to output plain PPM.
|
2013-05-27 01:56:56 +00:00
|
|
|
The
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -k
|
2013-05-27 01:56:56 +00:00
|
|
|
option makes
|
|
|
|
.I tojpg
|
2013-07-20 16:11:52 +00:00
|
|
|
output grey-scale images,
|
2013-05-27 01:56:56 +00:00
|
|
|
and the
|
|
|
|
.B -s
|
|
|
|
option makes it output scratched JPEG images.
|
|
|
|
.I Togeordi
|
|
|
|
is an
|
|
|
|
.IR rc (1)
|
|
|
|
script that invokes
|
|
|
|
.B tojpg
|
|
|
|
.BR -s .
|
2013-07-19 06:16:43 +00:00
|
|
|
.I Totif
|
|
|
|
accepts many options.
|
|
|
|
Choosing Huffman, T4, or T6 compression
|
2013-07-20 16:11:52 +00:00
|
|
|
forces the image to GREY1.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -3
|
|
|
|
Convert the image to a true color RGB image.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -b
|
|
|
|
Convert the image to a GREY1 black and white image.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
|
|
|
.B -g
|
2013-07-20 16:11:52 +00:00
|
|
|
Use T4 one-dimensional compression.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
|
|
|
.B -G
|
2013-07-20 16:11:52 +00:00
|
|
|
Use T4 two-dimensional compression.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
|
|
|
.B -h
|
|
|
|
Use Huffman compression.
|
|
|
|
.TP
|
2013-07-20 16:11:52 +00:00
|
|
|
.B -k
|
|
|
|
Convert the image to a GREY8 grey-scale image.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
|
|
|
.B -l
|
|
|
|
Use LZW compression.
|
|
|
|
.TP
|
|
|
|
.B -L
|
|
|
|
Use LZW compression with horizontal differencing.
|
2013-07-20 16:11:52 +00:00
|
|
|
Some TIFF decoders may not support horizontal
|
|
|
|
differencing applied to images of depths less than eight.
|
2013-07-19 06:16:43 +00:00
|
|
|
.TP
|
|
|
|
.B -p
|
|
|
|
Use Packbits compression.
|
|
|
|
.TP
|
|
|
|
.B -t
|
|
|
|
Use T6 compression.
|
2013-07-20 16:11:52 +00:00
|
|
|
.TP
|
|
|
|
.B -v
|
|
|
|
Convert the image to an RGBV color-mapped image.
|
|
|
|
.TP
|
|
|
|
.B -y
|
|
|
|
Convert the image to a GREY2 grey-scale image.
|
|
|
|
.I Totif
|
|
|
|
will then convert it to GREY4 before encoding
|
|
|
|
because TIFF does not support depths of two.
|
|
|
|
.TP
|
|
|
|
.B -Y
|
|
|
|
Convert the image to a GREY4 grey-scale image.
|
2013-07-19 06:16:43 +00:00
|
|
|
.PP
|
2011-03-30 13:49:47 +00:00
|
|
|
If there is only one input picture,
|
|
|
|
.I togif
|
|
|
|
converts the image to GIF format.
|
|
|
|
If there are many
|
|
|
|
.IR files ,
|
|
|
|
though, it will assemble them into an animated GIF file.
|
|
|
|
The options control this process:
|
|
|
|
.TP
|
|
|
|
.BI -l loopcount
|
|
|
|
By default, the animation will loop forever;
|
|
|
|
.I loopcount
|
|
|
|
specifies how many times to loop.
|
|
|
|
A value of zero means loop forever and a negative value means
|
|
|
|
to stop after playing the sequence once.
|
|
|
|
.TP
|
|
|
|
.BI -d msec
|
|
|
|
By default, the images are displayed as fast as they can be rendered.
|
|
|
|
This option specifies the time, in milliseconds, to pause while
|
|
|
|
displaying the next named
|
|
|
|
.IR file .
|
2016-06-10 10:14:02 +00:00
|
|
|
.TP
|
|
|
|
.B -E
|
|
|
|
Specifying this option instead of a list of files will read the frames from a pipe on fd 0.
|
|
|
|
Each frame is terminated with EOF.
|
|
|
|
End of the animation is specified by an extra EOF.
|
2011-03-30 13:49:47 +00:00
|
|
|
.PP
|
|
|
|
.I Gif
|
|
|
|
translates files that contain a `transparency' index by attaching
|
|
|
|
an alpha channel to the converted image.
|
|
|
|
.PP
|
|
|
|
.I Ico
|
2012-04-01 02:57:11 +00:00
|
|
|
displays or converts a Windows icon (.ico) file. If no file is
|
2011-03-30 13:49:47 +00:00
|
|
|
specified,
|
|
|
|
.I ico
|
|
|
|
reads from standard input.
|
|
|
|
Icon files
|
2012-04-01 02:57:11 +00:00
|
|
|
contain sets of icons represented by an image and a mask. The
|
|
|
|
.B -c
|
|
|
|
option causes
|
|
|
|
.I ico
|
|
|
|
to convert the first icon in the set and write it to standard
|
|
|
|
output in compressed Plan 9 image format. Otherwise, the whole
|
|
|
|
icon set is displayed.
|
2011-03-30 13:49:47 +00:00
|
|
|
Clicking the right button pops up a menu that lets you
|
|
|
|
write any icon's image as a Plan 9 image (\fIwidth\fBx\fIheight\fB.image\fR),
|
|
|
|
write any icon's mask as a Plan 9 image (\fIwidth\fBx\fIheight\fB.mask\fR),
|
|
|
|
or exit. Selecting one of the write menu items yields a sight cursor.
|
|
|
|
Move the sight over the icon and right click again to write.
|
|
|
|
.PP
|
|
|
|
.I Toico
|
|
|
|
takes a list of Plan 9 image files (or standard input) and creates
|
|
|
|
a single icon file. The masks in the icon file will be the white
|
|
|
|
space in the image. The icon file is written to standard output.
|
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/jpg
|
2013-05-27 01:56:56 +00:00
|
|
|
.br
|
|
|
|
.B /rc/bin/togeordi
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR page (1),
|
|
|
|
.IR image (6).
|
|
|
|
.br
|
2013-05-27 01:56:56 +00:00
|
|
|
.B http://www.w3.org/Graphics/JPEG/jfif3.pdf
|
|
|
|
.br
|
2011-03-30 13:49:47 +00:00
|
|
|
.B http://www.w3.org/Graphics/JPEG/itu-t81.pdf
|
|
|
|
.br
|
2013-05-27 01:56:56 +00:00
|
|
|
.B http://en.wikibooks.org/wiki/JPEG_-_Idea_and_Practice
|
|
|
|
.br
|
|
|
|
.B http://en.wikipedia.org/wiki/JPEG
|
|
|
|
.br
|
2011-03-30 13:49:47 +00:00
|
|
|
.B http://www.w3.org/Graphics/GIF/spec-gif89a.txt
|
|
|
|
.br
|
|
|
|
.B http://www.w3.org/TR/2003/REC-PNG-20031110
|
|
|
|
.br
|
2013-07-02 05:57:14 +00:00
|
|
|
.B http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
|
|
|
|
.br
|
2011-03-30 13:49:47 +00:00
|
|
|
.B http://netpbm.sourceforge.net/doc/ppm.html
|
|
|
|
.br
|
|
|
|
.B http://en.wikipedia.org/wiki/Windows_bitmap
|
|
|
|
.br
|
|
|
|
.B http://en.wikipedia.org/wiki/Yuv
|
|
|
|
.SH BUGS
|
|
|
|
Writing an animated GIF using
|
|
|
|
.I togif
|
|
|
|
is a clumsy undertaking.
|
2013-12-27 21:22:05 +00:00
|
|
|
.SH HISTORY
|
|
|
|
.I Tojpg
|
|
|
|
first appeared in 9front (May, 2013).
|
|
|
|
.I Tif
|
|
|
|
and
|
|
|
|
.I totif
|
|
|
|
first appeared in 9front (July, 2013).
|