Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Graphics on the command line
Description of Exif file format
Commands
Official Debian image viewer packages with high relevance
Command | Explanation | Remark |
---|---|---|
cjpeg / djpeg | Convert to/from the JPEG file format | Part of libjpeg-turbo-progs |
convert | Convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more | Part of imagemagick |
display | Displays an image or image sequence on any X server | Part of imagemagick |
exif | ||
exiftags | ||
exiftran | Digital camera JPEG image transformer | |
exiv2 | ||
jhead | jpeg exif editor | |
jpegpixi | Remove hot spots from JPEG images with minimal quality loss | |
feh | Image viewer and cataloguer | |
imagemagic | Create, edit, compose, or convert bitmap images in over 200 formats | |
imagetops | Generic image to ps filter | |
jpegexiforient / exifautotran | Manipulate EXIF orientation tag | Part of libjpeg-turbo-progs |
jpegtopnm | Convert JPEG/JFIF file to portable pixmap or graymap | |
jpegtran | Lossless transformations of JPEG files | Part of libjpeg-turbo-progs |
libjpeg-turbo-progs | programs for manipulating JPEG files | |
rdjpgcom / wrjpgcom | Read/write comments in JPEG files | Part of libjpeg-turbo-progs |
renrot | Rename and rotate files according to EXIF tags | |
scrot | Screen capture utility | |
tjbench | A simple JPEG benchmarking tool | Part of libjpeg-turbo-progs |
trend | General-purpose, efficient trend graph | |
webp | Convert a webp picture to png | dwebp picture.webp -o picture.png. Other commands: cwebp (encoder)tool, dwebp (decoder), vwebp (viewer), wepmux (muxing tool), gif2webp (convert GIF images to WebP) |
Xli | Command line tool for viewing images in X11 |
Screenshot
-delay | In milliseconds |
-window root | Full screen |
import -window root -resize 1920x1080 -delay 2000 screenshot.png
feh Show pictures
Save modified files
If you want files to be saved when the --edit option is applied aptitude install libjpeg-turbo-progs which contains the commandline tools mentioned above
So do feh --edit file.jpg Any modification is saved when feh is closed
Modifing keybindings
Key | Action | Remark |
---|---|---|
Backspace | Show previous file | |
Ctrl+Delete | Delete the file | |
< > | Rotation | From Debian 10 Buster use --edit if you want the modified file to be saved |
| _ | Mirroring | From Debian 10 Buster onwards use --edit if you want the modified file to be saved |
Command examples
Show all pictures in a folder
feh --fullscreen --hide-pointer --draw-exif --draw-filename * feh --geometry 800x450 --hide-pointer --draw-filename --edit --scale-down *
Show all pictures in a folder and all subfolders and scale to the sreen size
feh --recursive --scale-down *
Show all pictures in the folder in a 400×400 pixels window with a delay of 0.2 seconds once
feh --geometry 400x400 --slideshow-delay=0.2 --cycle-once
Errors
feh ERROR: Can't open X display. It *is* running, yeah?
Colors
xcolors - display all X11 color names and colors
convert (scale, resize)
Command | Description |
---|---|
identify -format “%wx%h\n” * | Show the size of all picutres in the current directory |
convert test.png test.jpg | |
convert test.jpg -resize 600×400\> test.jpg | Converts the image to a 600 x 400 image |
convert test.png -resize 400 test400.png | Converts the image to a 400 width image while maintining the aspect ratio |
convert '*.jpg[800x>]' item-%02d.jpg | Converts all .jpg files in the directory to files with a width of 800 while maintiaining the aspact ratio and changing the filename to something like item-03.jpg where the number counts from 00. If the width is 800 or less the image is not scaled |
for i in `ls test*.png`; do basename1=`echo $i | \ cut -d \. -f 1`; convert $i -resize 400 \ $basename1.400.png; done | Convert multiple images named test*.png to a 400 pixel width and name them test*.400.png |
for i in *.BMP; do convert $i "${i%.BMP}.png"; done | Convert all .BMP files in the directory to .png files |
convert -resize x16 -gravity center -crop 16x16+0+0 \ -flatten -colors 256 -background transparent \ image.png favicon.ico | Convert image.png to a favicon of size 16 x 16 pixels |
convert "filename.ext" -rotate 90 "filename-r.ext" ; |
Contrast, brightness
convert -brightness-contrast 20x30 test.jpg testbricon.jpg
| Increase the brightness with 20 and the contrast with 30 |
Convert
netpbm - package of graphics manipulation programs and libraries
Convert a pdf file made in RGB to CMYK with gs. This should work, it did not for us
gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \ -sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK \ -sOutputFile=output.pdf input.pdf
Convert a tiff file made in RGB to CMYK with Imagemagick's convert tool
Compression might be needed
convert source.tiff -colorspace CMYK -compress LZW destination.tiff
Optional commands
convert -list colorspace convert -list compress
Merge
Merge two or more pdf files (example with 3 input files)
pdfunite file1.pdf file2.pdf fil3.pdf outfile.pdf
Crop
- Install imagemagick
- Run display imagefile.extension
- You can zoom with the < and > keys
- Left click in the image to open the menu. Rightclick gives an other menu
- Select Transform | Crop
- Crop the image
- File | Save
- Select a file name and change it as needed
- Save
- Enger JPEG quality 75 Save
- File | Quit
display
Some keyboard accelerators for the display command:
Key | Function |
---|---|
Space | Next image |
Backspace | Previous image |
/ | Rotate by 90 degrees clockwise |
\ | Rotate by 90 degrees counter clockwise |
< | Zoom out |
> | Zoom in |
Esc | Quit |
More on display keyboard accelerators
Create animated gif
GIF: Graphics Interchange Format
convert -delay 10 -loop 0 *.png file.gif
The default delay tick is 1/100 of a second. So 10 → 1/10 th of a second
For two seconds use 200 or 2/1
Loop 0 means infinite number of loops
Save picture from clipboard
xclip -selection clipboard -t TARGETS -o
Now save all, since the image can be multi layer, the image/something instances where something can be png, bmp, jpg, and so on
xclip -selection clipboard -t image/png -o > /tmp/image.png xclip -selection clipboard -t image/bmp -o > /tmp/image.bmp
Webcam
fswebcam
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.