EnglishFrenchSpanish

Ad


OnWorks favicon

djpeg - Online in the Cloud

Run djpeg in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command djpeg that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


djpeg - decompress a JPEG file to an image file

SYNOPSIS


djpeg [ options ] [ filename ]

DESCRIPTION


djpeg decompresses the named JPEG file, or the standard input if no file is named, and
produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, GIF, Targa, or RLE
(Utah Raster Toolkit) output format can be selected. (RLE is supported only if the URT
library is available.)

OPTIONS


All switch names may be abbreviated; for example, -grayscale may be written -gray or -gr.
Most of the "basic" switches can be abbreviated to as little as one letter. Upper and
lower case are equivalent (thus -BMP is the same as -bmp). British spellings are also
accepted (e.g., -greyscale), though for brevity these are not mentioned below.

The basic switches are:

-colors N
Reduce image to at most N colors. This reduces the number of colors used in the
output image, so that it can be displayed on a colormapped display or stored in a
colormapped file format. For example, if you have an 8-bit display, you'd need to
reduce to 256 or fewer colors.

-quantize N
Same as -colors. -colors is the recommended name, -quantize is provided only for
backwards compatibility.

-fast Select recommended processing options for fast, low quality output. (The default
options are chosen for highest quality output.) Currently, this is equivalent to
-dct fast -nosmooth -onepass -dither ordered.

-grayscale
Force grayscale output even if JPEG file is color. Useful for viewing on
monochrome displays; also, djpeg runs noticeably faster in this mode.

-rgb Force RGB output even if JPEG file is grayscale.

-scale M/N
Scale the output image by a factor M/N. Currently the scale factor must be M/8,
where M is an integer between 1 and 16 inclusive, or any reduced fraction thereof
(such as 1/2, 3/4, etc.) Scaling is handy if the image is larger than your screen;
also, djpeg runs much faster when scaling down the output.

-bmp Select BMP output format (Windows flavor). 8-bit colormapped format is emitted if
-colors or -grayscale is specified, or if the JPEG file is grayscale; otherwise,
24-bit full-color format is emitted.

-gif Select GIF output format. Since GIF does not support more than 256 colors, -colors
256 is assumed (unless you specify a smaller number of colors).

-os2 Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is emitted if
-colors or -grayscale is specified, or if the JPEG file is grayscale; otherwise,
24-bit full-color format is emitted.

-pnm Select PBMPLUS (PPM/PGM) output format (this is the default format). PGM is
emitted if the JPEG file is grayscale or if -grayscale is specified; otherwise PPM
is emitted.

-rle Select RLE output format. (Requires URT library.)

-targa Select Targa output format. Grayscale format is emitted if the JPEG file is
grayscale or if -grayscale is specified; otherwise, colormapped format is emitted
if -colors is specified; otherwise, 24-bit full-color format is emitted.

Switches for advanced users:

-dct int
Use integer DCT method (default).

-dct fast
Use fast integer DCT (less accurate). In libjpeg-turbo, the fast method is
generally about 5-15% faster than the int method when using the x86/x86-64 SIMD
extensions (results may vary with other SIMD implementations, or when using
libjpeg-turbo without SIMD extensions.) If the JPEG image was compressed using a
quality level of 85 or below, then there should be little or no perceptible
difference between the two algorithms. When decompressing images that were
compressed using quality levels above 85, however, the difference between the fast
and int methods becomes more pronounced. With images compressed using quality=97,
for instance, the fast method incurs generally about a 4-6 dB loss (in PSNR)
relative to the int method, but this can be larger for some images. If you can
avoid it, do not use the fast method when decompressing images that were compressed
using quality levels above 97. The algorithm often degenerates for such images and
can actually produce a more lossy output image than if the JPEG image had been
compressed using lower quality levels.

-dct float
Use floating-point DCT method. The float method is mainly a legacy feature. It
does not produce significantly more accurate results than the int method, and it is
much slower. The float method may also give different results on different
machines due to varying roundoff behavior, whereas the integer methods should give
the same results on all machines.

-dither fs
Use Floyd-Steinberg dithering in color quantization.

-dither ordered
Use ordered dithering in color quantization.

-dither none
Do not use dithering in color quantization. By default, Floyd-Steinberg dithering
is applied when quantizing colors; this is slow but usually produces the best
results. Ordered dither is a compromise between speed and quality; no dithering is
fast but usually looks awful. Note that these switches have no effect unless color
quantization is being done. Ordered dither is only available in -onepass mode.

-map file
Quantize to the colors used in the specified image file. This is useful for
producing multiple files with identical color maps, or for forcing a predefined set
of colors to be used. The file must be a GIF or PPM file. This option overrides
-colors and -onepass.

-nosmooth
Use a faster, lower-quality upsampling routine.

-onepass
Use one-pass instead of two-pass color quantization. The one-pass method is faster
and needs less memory, but it produces a lower-quality image. -onepass is ignored
unless you also say -colors N. Also, the one-pass method is always used for
grayscale output (the two-pass method is no improvement then).

-maxmemory N
Set limit for amount of memory to use in processing large images. Value is in
thousands of bytes, or millions of bytes if "M" is attached to the number. For
example, -max 4m selects 4000000 bytes. If more space is needed, temporary files
will be used.

-outfile name
Send output image to the named file, not to standard output.

-memsrc
Load input file into memory before decompressing. This feature was implemented
mainly as a way of testing the in-memory source manager (jpeg_mem_src().)

-verbose
Enable debug printout. More -v's give more output. Also, version information is
printed at startup.

-debug Same as -verbose.

-version
Print version information and exit.

EXAMPLES


This example decompresses the JPEG file foo.jpg, quantizes it to 256 colors, and saves the
output in 8-bit BMP format in foo.bmp:

djpeg -colors 256 -bmp foo.jpg > foo.bmp

HINTS


To get a quick preview of an image, use the -grayscale and/or -scale switches. -grayscale
-scale 1/8 is the fastest case.

Several options are available that trade off image quality to gain speed. -fast turns on
the recommended settings.

-dct fast and/or -nosmooth gain speed at a small sacrifice in quality. When producing a
color-quantized image, -onepass -dither ordered is fast but much lower quality than the
default behavior. -dither none may give acceptable results in two-pass mode, but is
seldom tolerable in one-pass mode.

If you are fortunate enough to have very fast floating point hardware, -dct float may be
even faster than -dct fast. But on most machines -dct float is slower than -dct int; in
this case it is not worth using, because its theoretical accuracy advantage is too small
to be significant in practice.

ENVIRONMENT


JPEGMEM
If this environment variable is set, its value is the default memory limit. The
value is specified as described for the -maxmemory switch. JPEGMEM overrides the
default value specified when the program was compiled, and itself is overridden by
an explicit -maxmemory.

Use djpeg online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    wxPython
    wxPython
    A set of Python extension modules that
    wrap the cross-platform GUI classes from
    wxWidgets.. Audience: Developers. User
    interface: X Window System (X11), Win32 ...
    Download wxPython
  • 2
    packfilemanager
    packfilemanager
    This is the Total War pack file manager
    project, starting from version 1.7. A
    short introduction into Warscape
    modding: ...
    Download packfilemanager
  • 3
    IPerf2
    IPerf2
    A network traffic tool for measuring
    TCP and UDP performance with metrics
    around both throughput and latency. The
    goals include maintaining an active
    iperf cod...
    Download IPerf2
  • 4
    fre:ac - free audio converter
    fre:ac - free audio converter
    fre:ac is a free audio converter and CD
    ripper for various formats and encoders.
    It features MP3, MP4/M4A, WMA, Ogg
    Vorbis, FLAC, AAC, and Bonk format
    support, ...
    Download fre:ac - free audio converter
  • 5
    BotMan
    BotMan
    Write your chatbot logic once and
    connect it to one of the available
    messaging services, including Amazon
    Alexa, Facebook Messenger, Slack,
    Telegram or even yo...
    Download BotMan
  • 6
    gerbv  a Gerber (RS-274X) viewer
    gerbv a Gerber (RS-274X) viewer
    Gerbv is an open source Gerber file
    (RS-274X only) viewer. Gerbv lets you
    load several files on top of each other,
    do measurements on the displayed image,
    etc. ...
    Download gerbv a Gerber (RS-274X) viewer
  • 7
    Iometer
    Iometer
    I/O performance Analysis Tool.
    Audience: Developers, Information
    Technology, Science/Research, System
    Administrators. User interface: Win32
    (MS Windows). Progr...
    Download Iometer
  • More »

Linux commands

Ad