To insert a new image into a Zendiwiki page, three steps are required:
For Zendiwiki it is strongly recommended to use only four image sizes: Width 360, 540, 720 or 1080 pixels. (The size of an image is usually described by its width. A change in width means a proportional change in height.) To ensure optimal functionality, only image files that are already in these formats should be uploaded to the wiki. The recommended format for image files is PNG.
You can resize images with your favourite image editor software, such as GIMPFOSS. Instructions for this are available, for example, at https://www.gimp.org/tutorials/GIMP_Quickies/#changing-the-size-dimensions-of-an-image-scale.
As an alternative, the ImageMagick software package FOSS for image processing contains the command line tool convert. With it it is possible to convert various properties of image files efficiently and accurately, even in one pass. Examples for Linux shell commands:
Example 1:
convert -resize 540\> waterfall-original-big.jpg waterfall-540.png
This command does the following:
waterfall-540.png
in the current directory..jpg
image format to the .png
format.\>
means: do not enlarge a smaller image. (With enlarging, the image quality tends to deteriorate.)Example 2:
mkdir images-360; convert "*.jpg[360x>]" -set filename:base "%[basename]" "images-360/%[filename:base]_w360p.png"
Does the following:
*.jpg
: Convert all image files in the current directory, ending with .jpg
.[360x>]
: Shrink the images to 360 pixels width. Do not enlarge smaller images (achieved by the >
).png
.%[basename]
), each extended by the string _w360p
.images-360/
(must exist).Sometimes Images have to be rotated beforehand:
convert -rotate 90 source-image-file.jpg target-image-file-rotated.jpg