Results 1 to 7 of 7

Thread: How to determine the quality of a jpeg from the CLI

  1. #1
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    How to determine the quality of a jpeg from the CLI

    I'm looking for a faster CLI command to determine the quality of a jpeg.

    The only method that I know of at the moment uses the identify program (part of imagemagick):

    Code:
    stop@intersection:~% identify -verbose IMG_1681.JPG | grep -i Quality | awk '{print $2}'
    98
    But this command is dog-slow:

    Code:
    stop@intersection:~% time identify -verbose IMG_1681.JPG | grep -i Quality | awk '{print $2}'
    98
    
    real	0m8.769s
    user	0m8.661s
    sys	0m0.100s
    Do you know of a better (quicker) way?

  2. #2
    Join Date
    Jan 2007
    Beans
    2,052

    Re: How to determine the quality of a jpeg from the CLI

    i found two packages in the repo that look like they might be what you're looking for:
    imageinfo
    &
    jpeginfo
    Linux User #440528
    openSUSE 12.1 x86_64/KDE 4.8.4

  3. #3
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to determine the quality of a jpeg from the CLI

    Thanks for that disturbedite, but unfortunately, neither give info on the compression quality.

  4. #4
    Join Date
    Jan 2007
    Beans
    2,052

    Re: How to determine the quality of a jpeg from the CLI

    there is a new package that just hit the repo today for intrepid, it is called libimage-metadata-jpeg-perl. but it seems as if it is only for metadata, but i just thought i'd mention it...
    here is the description:
    This package provides an interface for reading and interpreting the
    content of JPEG segments, in particular of those segments containing
    metadata (like TIFF headers, thumbnails, Exif info, IPTC info, comments,
    etc.). Some segments can even be modified and rewritten to disk.

    The author claims that this module is still EXPERIMENTAL: use it at your
    own risk.
    Linux User #440528
    openSUSE 12.1 x86_64/KDE 4.8.4

  5. #5
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to determine the quality of a jpeg from the CLI

    Thanks for the tip!

  6. #6
    Join Date
    Jan 2007
    Beans
    2,052

    Re: How to determine the quality of a jpeg from the CLI

    no prob. that is what we're here for.

    but sorry, i know it prolly isn't exactly what you're looking for...
    Linux User #440528
    openSUSE 12.1 x86_64/KDE 4.8.4

  7. #7
    Join Date
    Jul 2008
    Beans
    1

    Re: How to determine the quality of a jpeg from the CLI

    Did you find a faster solution?

    I has reach the same method and here is also very slow.
    I have a lot of photos to check and this way ...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •