Code: Select all
v20.00.0016 - 2019-06-03 11:37 + SC SaveThumb enhanced: - New value 4 to argument "transparency" to allow using the canvas color as background color for transparent areas. - New value 4 to argument "flags" to allow centering the original image in a canvas defined by "widthbox" and "heightbox". - Added argument "color_canvas" to specify the background color of the canvas (flags 4). Syntax: savethumb(file="<curitem>", thumbnail_file="*_thumb", _ widthbox, heightbox, format="jpg", border_width, flags, _ transparency=2, color_canvas) flags: (bit field) 1 = Drop Shadow on white border (border_width has to be set). 2 = Zoom To Fill: Zoom the thumb to fill the whole box. If heightbox is missing it defaults to widthbox, and vice versa (= square box). 4 = Arguments "widthbox" and "heightbox" are taken as size of a canvas in which the input image ("file") is centered. If necessary the image is shrunk to fit the canvas. The resulting image will have these dimensions no matter the size of the input image. transparency: -1 = Preserve any transparency 0 = Neutral 1 = Grid 2 = White [Default] 3 = Black 4 = Use the value stated in color_canvas color_canvas: Canvas background color in hex RRGGBB. If missing it defaults to the current window backcolor (dark mode aware). Examples: // save selected image centered in white 1080x1080 PNG, transparent areas also white savethumb(, "*_<widthbox>x<heightbox>", 1080, 1080, "png", , 4, 4, "FFFFFF"); // save selected image centered in 1080x566 PNG, background and transparent areas // in window backcolor (dark mode aware) savethumb(, "*_<widthbox>x<heightbox>", 1080, 566 , "png", , 4, 0); * Updated the help file.
Note that BETA versions are work in progress and might contain fresh bugs. You have been warned.
It's a good idea to backup your complete XYplorer settings (menu File | Settings Special | Backup Application Data Folder...)
before running a new BETA version. This will also help in fixing any fresh bugs.