New features for the Matrix42 Package Robot Part I

Moderator: MVogt

Post Reply
User avatar
Theo_Gottwald
Posts: 367
Joined: 03. Oct 2009, 08:57
Location: Herrenstr.11 * 76706 Dettenheim
Contact:

New features for the Matrix42 Package Robot Part I

Post by Theo_Gottwald » 03. Aug 2018, 11:45

With the new GRA\ command, you can automatically process images. This means:
1. resize images via script (scale)
2. convert images using a script in many formats, for example JPG->.ico (details below)
3. determine the resolution/size of images.

Code: Select all

' General Syntax
GRA\[convert|resolution]|parameter
GRA\convert|src -> dst[|resolution[#][|quality]]

' Samples
GRA\convert|?desktop\image.png -> ?desktop\image.jpg 
GRA\convert|?desktop\image.png -> ?desktop\scaled.jpg|500#|90
GRA\convert|?desktop\image.png -> ?desktop\scaled.png|400

' Determine Picture resolution
GRA\resolution|srcfile

' Sample:
GRA\resolution|?desktop\image.jpg
SBT\5|x: $v1$, y: $v2$   
The command was already available for testing, but has now corrected and expanded. It is now an official command of the MPR. This instruction implements various graphics commands and supports the following file formats:

Code: Select all

Format                                  Endung
Windows Bitmap                          bmp
Windows Metafile                        emf
Graphics Interchange Format             gif
Windows Icon                            ico
JPEG File Interchange Format            jpg, jpeg
Portable Network Graphics               png
Tagged Image File Format                tif, tiff
Windows Enhanced Metafile               wmf
Using this command, Image files can be converted in a different format and scaled.
The 'resolution' parameter specifies the horizontal Resolution in pixels.
The target resolution may only exceed the resolution of the source file if to the parameter ' #' will be appended (upscaling), otherwise the source resolution is used (convert mode).
The 'quality' parameter specifies the quality of generated jpeg file in %, default value is 75.

Post Reply

Return to “Package Robot”

Who is online

Users browsing this forum: No registered users and 1 guest