ImageUtil

Published on March 8, 2022

🏷️ Tags: #extensions

A non-visible extension that provides additional tools to the built-in Image component.

Made with Niotron IDE at https://ide.niotron.com.

Click here to view the official MIT App Inventor community post, and click here to view the official GitHub repository.

Current version: 4 Package name: com.gordonlu.imageutil.aix

πŸ“– Documentation

Method blocks

ApplyGrayscaleAndFade - Applies grayscale effect to an image and fades the image.

Parameter: component = image

ApplyWatermark - Applies watermark text to the given image's content. Set the text of the watermark via the watermark parameter, and the x and y parameters are the co-ordinates of the watermark located on the image. The parameter color is the text color of the watermark, and alpha is the luminance of the watermark. The size parameter is the size of the watermark in points. Specify whether to underline the watermark via the underline boolean parameter. Use the blocks in the properties of this extension for the font parameter. If useCurrentFont is true, the font parameter will be ignored.

Parameters: image = component, watermark = text, x = number (int), y = number (int), color = color, alpha = number (int), size = number (int), underline = boolean, font = text, useCurrentFont = boolean

ColorBoost - Applies color boost to the content of the given content. To find out the type parameter, go to: https://shaikhhamadali.blogspot.com/2013/07/color-boost-imagebitmap-in-imageview.html. type should be a value, either 1, or 2, or 3.

Parameters: image = component, type = number (int), percent = number (float)

GammaEffect - Applies gamma effect to the given image.

Parameters: image = component, red = number (double), green = number (double), blue = number (double)

ImageAlpha - Returns the alpha that was applied to this ImageView. This will probably be a value between 0 and 255. Returns: number (int)

Parameters: image = component

IsCroppedToPadding - Checks whether this image is cropped to padding. Returns: boolean

Parameters: image = component

RoundCorners - Applies round corners to the Image, with the radius parameter as the radius of each corner.

Parameters: image = component, radius = number (int)

SepiaToningEffect - Turns the image to a Sephia Toned version of the image, by specifying the depth, red, green and blue parameters.

Parameters: image = component, depth = number (int), red = number (double), green = number (double), blue = number (double)

SetBrightness - Sets the brightness of the content for the given image, according to the value parameter.

Parameters: image = component, value = number (int)

SetCropToPadding - Sets whether the image should crop to padding.

Parameters: image = component, cropToPadding = boolean

SetImageAlpha - Sets the alpha value that should be applied to the image.

Parameters: image = component, alpha = number (int)

SetImageTintColor - Change the image tint color. You can use too alpha values if you want with the 'make a list' block. Do not forget to use the 'make color' block together with the 'make a list' block.

Parameters: image = component, tint = color

SetPadding - Sets the padding of the given image.

Parameters: image = component, left = number (int), top = number (int), right = number (int), bottom = number (int)

UndoGrayscaleAndFade - Undos the grayscale and fade effects applied with the AplyGrayscaleAndFade method.

Parameters: image = component

Property blocks

DefaultFont - A font block. Returns: "DEFAULT"

Monospace - A font block. Returns: "MONOSPACE"

SansSerif - A font block. Returns: "SANS SERIF"

Serif - A font block. Returns: "SERIF"

Open Source

The source code of the extension is available in GitHub. Thank you!

TERMS AND CONDITIONS

By downloading or sharing my extension, you agree to follow these terms and conditions.

  1. Have fun using the extension!

  2. This, along with the MIT App Inventor original post above and the official GitHub repository above, are the only authorized places to download this extension. As an organization, you are not allowed to host and advertize this extension on your website, document, tweet, blog, article or any software you made without my authorization. You are also reminded not to include a direct download link of this extension on your website without my permission. If you are interested in the actions listed above, please contact me via email. Do remember that if you violate term no. 2, AICODE has the right to flag your website, document, tweet, blog or article as a violation of copyright, or other legal actions will be taken. Please contact me if you find anyone do this.

However, you can copy the link of this webpage and share it to someone as a personal identity (not as an organization), or sharing it on these authorized forums: App Inventor, Kodular, Niotron, Appzard and Android Builder communities. The term organization includes schools, markets and app stores, companies and social groups. Thank you for your understanding.

Those organizations are authorized to advertize or host my extension:

  • Kodular admins

  • MIT App Inventor admins

  • Pura Vida Apps / Taifun Baer

  1. Selling this extension/product to anyone is not allowed unless authorized by AICODE.

  2. These terms and conditions are written and issued on December 20, 2021. AICODE has the total permission to edit these terms and conditions anytime.