# Decode JPEG images

Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/gst-jpg-decode-example.html](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-jpg-decode-example.html)

The **gst-jpg-decode-example** application allows you to decode JPEG images and
        view the decoded images on a screen.

The following figure shows the pipeline for gst-jpg-decode-example. For information about
            the plugins used in the pipeline flow, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-jpg-decode-example.html#gst-jpg-decode-example__section_pmp_wyv_42c).

Figure : gst-jpg-decode-example pipeline
            
            <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="860" height="120" viewbox="0 0 860 120">
  <g>
    <rect x=".499946594238224" y=".500244140625" width="859.00048828125" height="119" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
    <path d="M852.000007629394531,1c3.85980224609375,0,7,3.140228271484375,7,7v104c0,3.859771728515625-3.14019775390625,7-7,7H8.000007629394531c-3.859779357910156,0-7-3.140228271484375-7-7V8c0-3.859771728515625,3.140220642089844-7,7-7h844M852.000007629394531,0H8.000007629394531C3.581672668457031,0,.000007629394531,3.581787109375.000007629394531,8v104C.000007629394531,116.418212890625,3.581672668457031,120,8.000007629394531,120h844c4.418212890625,0,8-3.581787109375,8-8V8c0-4.418212890625-3.581787109375-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <g>
    <g>
      <g>
        <line x1="276.739845275878906" y1="42.97088623046875" x2="293.100654602051691" y2="42.97088623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="292.079353332519531 46.461334228515625 298.124031066894531 42.97088623046875 292.079353332519531 39.48046875 292.079353332519531 46.461334228515625"></polygon>
      </g>
      <g>
        <line x1="136.848564147949219" y1="42.97088623046875" x2="153.209373474121094" y2="42.97088623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="152.188072204589844 46.461334228515625 158.232734680176691 42.97088623046875 152.188072204589844 39.48046875 152.188072204589844 46.461334228515625"></polygon>
      </g>
      <g>
        <line x1="418.264381408691406" y1="42.97088623046875" x2="434.625190734863281" y2="42.97088623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="433.603889465332031 46.461334228515625 439.648567199707031 42.97088623046875 433.603889465332031 39.48046875 433.603889465332031 46.461334228515625"></polygon>
      </g>
      <rect x="440.64854530721459" y="17.004400185474879" width="119.14035703398622" height="51.932976143021733" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(472.409469604492188 47.980171203613281)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">jpegdec</tspan></text>
      <rect x="299.124021626103058" y="17.004400185474879" width="119.14035703398622" height="51.932976143021733" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(325.323226928710938 47.256538391113281)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">capsfilter</tspan></text>
      <g>
        <line x1="559.788887023925781" y1="42.97088623046875" x2="576.149726867675781" y2="42.97088623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="575.128425598144531 46.461334228515625 581.173042297363281 42.97088623046875 575.128425598144531 39.48046875 575.128425598144531 46.461334228515625"></polygon>
      </g>
      <g>
        <line x1="701.310310363769531" y1="42.97088623046875" x2="717.671089172363281" y2="42.97088623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="716.649787902832031 46.461334228515625 722.694465637207031 42.97088623046875 716.649787902832031 39.48046875 716.649787902832031 46.461334228515625"></polygon>
      </g>
      <rect x="723.694465842714635" y="17.004400185474879" width="119.140357033989858" height="51.932976143021733" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(739.362556457519531 47.646682739257812)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
      <rect x="582.173068988327941" y="17.004400185474879" width="119.14035703398622" height="51.932976143021733" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(596.016456604003906 47.256538391113281)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">videoconvert</tspan></text>
      <rect x="157.916113220133411" y="17.004400185474879" width="119.140357033988039" height="51.932976143021733" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(177.650344848632812 47.646839141845703)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">multifilesrc</tspan></text>
      <rect x="17.165177123295507" y="17.970888256986655" width="120" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(62.255134582519531 47.646896362304688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">JPG</tspan></text>
    </g>
    <g>
      <text transform="translate(764.344947814941406 99.08709716796875)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="744.093946845161554" y="86.995599814525121" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

## Run the application

1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70022-50/topic/mm_sample_apps_prerequisites.html).
2. Input at least one `filename_%d.jpg` on the target device.
3. In the terminal of the target device, run the use case. Specify the application
                    with parameters such as width and
                    height.

        gst-jpg-decode-example -w 1920 -h 1080 -i /etc/media/filename_%d.jpgCopy to clipboard
4. To stop the use case, use CTRL +
                    C.
5. In the terminal of the target device, run the following command in the SSH shell
                    to display the available help
                    options:

        gst-jpg-decode-example --helpCopy to clipboard

## Expected output

The decoded image is displayed on the screen for preview.

## Pipeline flow

The following table lists the plugins used to run the decode JPEG images
                    pipeline:| Plugin | Description |
| --- | --- |
| multifilesrc | Reads the video data from sequentially named files. |
| capsfilter | Enforces constraints on the video data. |
| jpegdec | Decodes the JPEG video stream. |
| videoconvert | Converts the video frames from one format to another. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html) | Displays the video stream on the Wayland display. |

**Parent Topic:** [Run sample applications for a camera](https://docs.qualcomm.com/doc/80-70022-50/topic/camera-sample-applications.html)

Last Published: Feb 20, 2026

[Previous Topic
Wide dynamic range and electronic image stabilization](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/dynamic-range-and-image-stabilization.md) [Next Topic
Run sample applications for video and audio](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/audio-sample-applications.md)