Resize and compress all images in directory on Linux

Requirements:

sudo apt install imagemagick

To convert all images in current directory and move resized to up to 1920 width, and with quality 90% to directory 'compress'

find . -maxdepth 1 -type f -name '*.jpg' -exec bash -c 'convert  "$1" -resize 1920 -quality 90 "./compress/${1%.jpg}_compress.jpg" ' bash  {} \;

Where find all images in current directory with .jpeg extension and executes in bash XXX script

find . -maxdepth 1 -type f -name '*.jpg' -exec bash -c 'XXX' bash  {} \;

Where XXX script is imagick convert with current file filename $1 and the base name of file name 1%.jpg before .jpg sufix:

convert  image.jpg  -resize 1920 -quality 90 "image_compress.jpg";

Read more

Windows Use UTC Time

ctrl+R -> RegEdit -> enter Registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation Key: RealTimeIsUniversal Type: DWORD (32-bit) Value. Value: 1 Then restart PC

Extend »

Missing foreign keys finder

Sometimes when you need to import big bunch of data you may need to consider setting a flag: SET session_replication_role = 'replica'; However, this import,

Extend »

Rider support MAUI .NET

If want to create .NET application with MAUI uusing Rider. you don’t need to install Visual Studio. All you need is run this commands dotnet

Extend »
HTTP 204 - No Content
Scroll to Top