Here is the image processing function from my script: If the width is determined to exceed MAXWIDTH, then another ImageMagick program named convert is called to reduce the image's width. The limit itself is configurable via the variable $MAXWIDTH. The width value is assigned to the variable W for use as a comparator to the limit of 600. This step uses the identify program from the ImageMagick suite to determine the width (%w). My prepimg.sh script checks the pixel width of the files in this directory and resizes any that exceed the limit. The screenshot utility saves the image to the Pictures directory with a generic name-something like Screenshot-20210923222312.png. This script uses two tools from the ImageMagick suite. I wrote a Bash script called prepimg.sh to handle these tasks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |