3
$ gnome-screenshot -f test.png
$ identify test.png
test.png PNG 1920x1080 1920x1080+0+0 8-bit DirectClass 275KB 0.000u 0:00.000
$ xwininfo -root | grep Depth
  Depth: 24

It generates 8-bit images, but I want 24-bit depth screenshots.

I need to generate high quality screenshots, any idea?

I did look into --help and --help-all and --help-gtk parameters of gnome-screenshot

Zanna
  • 72,312

2 Answers2

1

I got this hint from Bash script to take screenshot and save the image - Ubuntu. I alternatively used imagemagick and vary the depth using the following (hint from here on imagemagick.org).

-depth value

depth of the image.

This the number of bits in a color sample within a pixel. Use this option to specify the depth of raw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change the depth of any image after it has been read.

f01
  • 246
1

imagemagick import subjectively brings much better image quality even without quality arguments (or -define png: arguments)

but it indeed shows 8-bit depth:

$ import -depth 24 -window root test.png
$ identify test.png
  test.png PNG 1920x1080 1920x1080+0+0 8-bit DirectClass 359KB 0.000u 0:00.000

But the picture is of much better quality than with gnome-screenshot

I have to figure out how best to define the png parameters for import (I want lossless compression) but I think it might be for another question.

import might be buggy. Another possibility might be shutter, but it has far fewer command line arguments

Zanna
  • 72,312