Image processing component. The component reads images of any type that .Net understands (jpeg, gif, png, bmp, tif, and possibly others). It can execute simple commands, like resizing, and convert images to a different type.
Statement to extract images and commands.
Fit image to requested size, preserving aspect ratio. For example, size(100,100) would convert a 500x400 image to a 100x80 image.
|thumb(<width>,<height>)||Force image to requested size, preserving aspect ratio, and padding with transparent (for png) or white pixels if necessary. For example, thumb(100,100) would convert a 500x400 image to a 100x80 image, then pad it to become a 100x100 image.|
Statement to save image. This command is repeated once for every image returned in the command resultset.
Allows you to validate the parameters supplied by the user before any other SQL is run in the component. This call is only made if the component has visible parameters, the SQL is a stored procedure, and 'Validate parameters' is checked.
Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.
Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.
The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.
If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.
This example is a procedure used by a scheduled job that periodically scans the EmployeePhoto table, converts new photos to JPEG and resizes them to 256x256 pixels.
CREATE OR ALTER PROCEDURE dbo.EmployeePhoto_Resize @Command bit = 0, @Id int = 0, @Filename varchar(300) = NULL, @Image varbinary(max) = NULL AS BEGIN IF @Command = 1 BEGIN SELECT TOP (10) EP.EmployeePhotoId AS Id, EP.EmployeePhoto, EP.EmployeePhotoFilename, 'thumb(256,256)' AS Command, 'jpg' AS DestinationFormat FROM dbo.EmployeePhoto EP WHERE EP.HasBeenConverted = 0; RETURN; END; IF @Id IS NOT NULL BEGIN UPDATE dbo.EmployeePhoto SET EmployeePhoto = @Image, EmployeePhotoFilename = @Filename, HasBeenConverted = 1 WHERE EmployeePhotoId = @Id; END; END;