[PAID] ImageEditor Extension ((Unleash Your Artistic Vision in Image Editing!))

Hello, developers! today I am Introducing the "Image Editor Extension " by Mr_Koder is a versatile and powerful Extension that enables users to easily manipulate and transform images within their applications. This comprehensive tool provides a range of features and functions designed to make image editing simple and efficient.

With the "Image Editor Extension," users can effortlessly customize and process images to suit their requirements, making it an indispensable tool for any application that deals with images.

let us explain more


Documentation

Blocks

component_method

This block, AdjustContrast, modifies the contrast of an image based on the given contrast value.

How to use it:

  • Input a base64 encoded image string as base64Image.
  • Input an integer between -100 to 100 as contrastValue. A value of -100 minimizes the contrast, 0 keeps the original contrast, and 100 maximizes the contrast.

This block returns a new base64 encoded image with the adjusted contrast.

710920591

121916189






component_method (1)

This block, ApplyBlur, applies a blur or sharpen effect to an image based on the specified blur level.

How to use it:

  • Input a base64 encoded image string as base64Image.
  • Input a float between -100 to 100 as blurLevel. Positive values apply a blur effect, while negative values apply a sharpen effect.
    This block returns a new base64 encoded image with the blur or sharpen effect applied.

710920591

939293774

938004495







This block, ApplyBritnessEffect, adjusts the brightness of an image based on the given brightness factor.

How to use it:

  • Input a base64 encoded image string as base64Image.
  • Input an integer between -100 to 100 as brightnessFactor. Positive values increase brightness, while negative values decrease it.

This block returns a new base64 encoded image with the adjusted brightness.

710920591

831821406







This block, ApplyClarityEffect, applies a clarity effect to a Base64 image with the specified adjustment value.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input an integer value for adjustmentValue between -100 and 100 to control the clarity effect. Negative values will smooth the details, positive values will enhance the details, and values close to zero will have little effect on the image.

This block returns a new Base64 encoded image with the clarity effect applied.

The ApplyClarityEffect Block first scales down the input image to speed up processing. Then, it applies a Gaussian blur to the scaled image. Next, it processes the original and blurred images in parallel using an ExecutorService to enhance or smooth the details based on the adjustment value. Finally, it scales the processed image back to its original size before returning the Base64 encoded result.
710920591

1011313241







This block, ApplyFadeEffect, applies a fade effect to a Base64 image with the specified fade value.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input an integer value for fadeValue between 0 and 100 to control the amount of fade. A value of 0 results in no fade effect (the original image), while a value of 100 results in the maximum fade effect.
    This block returns a new Base64 encoded image with the fade effect applied.

The ApplyFadeEffect Block calculates the fade factor based on the input fade value and creates a new ColorMatrix that scales the input image's color channels based on the fade factor. This is applied to the source image , which modifies the output image's colors based on the specified matrix.

710920591

699416239







component_method (6)

This block, ApplyHighLights, applies a highlights effect to a Base64 image with the specified intensity.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a float value for intensity between 0 and 100 to control the intensity of the highlights effect. A value of 0 results in no change, while a value of 100 results in the maximum highlights effect.

This block returns a new Base64 encoded image with the highlights effect applied.

The ApplyHighLights Block creates a new ColorMatrix that scales the input image's color channels based on the given intensity. This is applied to the source image using the ColorMatrixColorFilter class, which modifies the output image's colors based on the specified matrix.

710920591

121916189







component_method (7)

This block, ApplyPixelate, applies a pixelate effect to a Base64 image with the specified intensity.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a float value for intensity between 0 and 100 to control the pixelation effect. A value of 0 results in no pixelation (the original image), while a value of 100 results in the maximum pixelation effect.

This block returns a new Base64 encoded image with the pixelate effect applied.

The ApplyPixelate block first decodes the Base64 image string to a Bitmap. Then, it calculates the blockSize based on the input intensity value.

If the blockSize is less than or equal to 1, the block returns the original Base64 image as no pixelation is applied.

Otherwise, it creates a new Bitmap and Canvas for the pixelated image. It iterates through the input image in blocks of the calculated size, obtaining the color of the central pixel in each block and drawing a filled rectangle with that color on the new canvas. The result is a pixelated version of the input image. The block returns the Base64 encoded pixelated image.

710920591

926197527






component_method (8)

This block, ApplySaturation, adjusts the saturation of an image based on the specified saturation value.

How to use it:

  • Input a base64 encoded image string as base64Image.
  • Input an integer between -100 to 100 as saturationValue. A value of -100 completely desaturates the image (grayscale), 0 keeps the original saturation, and 100 maximizes saturation.

This block returns a new base64 encoded image with the adjusted saturation.

710920591


975014126

920535566






this block ApplyTextureOverlayEffect, a powerful feature of the "Creative Image Transformer" that allows you to enhance your images with a custom texture overlay. This block enables blending of textures and images with adjustable opacity, creating a unique and captivating visual effect.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a Base64 encoded texture string as base64Texture.
  • Input an integer value for opacity to control the transparency of the texture overlay (0-100).
  • Input an integer value for maxDimension to scale down the input image and texture, improving performance.

This block returns a new Base64 encoded image with the texture overlay applied and the specified opacity.

The ApplyTextureOverlayEffect block first decodes the input image and texture into Bitmaps. Then, it scales down the input image and texture according to the specified maxDimension to improve performance. Next, it creates an output Bitmap and draws the scaled input image on a Canvas. The block then configures a Paint object with the desired opacity and blend mode (PorterDuff.Mode.SCREEN) to blend the texture with the input image. The scaled texture Bitmap is drawn on the Canvas with the configured Paint object. Finally, the output Bitmap is encoded as a Base64 string and returned.

710920591

442417837

510598801

583697856

972410323







component_method (10)

This block the ApplyTint block , an essential feature of the "Creative Image Transformer" that allows you to add a tint effect to your images with a specified color and intensity. This block enables customization of the appearance of your images, giving them a fresh and unique look.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input an integer value for tintColor representing the color of the tint (in the format 0xAARRGGBB).
  • Input a float value for intensity to control the intensity of the tint (0.0 to 1.0).

This block returns a new Base64 encoded image with the tint effect applied and the specified color and intensity.

The ApplyTint block first removes the header from the input Base64 image and decodes it into a Bitmap. It then creates a new tinted Bitmap with the same dimensions as the input image. A Canvas is created for drawing on the tinted Bitmap. Next, the block sets up a Paint object with the specified tint color, intensity (alpha), and blend mode (PorterDuff.Mode.SRC_ATOP). The input image is drawn on the Canvas, followed by a rectangle with the configured Paint object, which applies the tint effect. Finally, the tinted Bitmap is encoded back into a Base64 string and returned.

710920591

219239862

539532446

543752638

871820996






component_method (11)

This block, ApplyVignette, applies a vignette effect to a Base64 image with the specified intensity.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a float value for intensity between 0 and 100 to control the intensity of the vignette effect. A value of 0 results in no vignette, while a value of 100 results in the maximum vignette effect.

This block returns a new Base64 encoded image with the vignette effect applied.

710920591

884742008






component_method (12)

This block, ApplyWarmth, applies a warmth effect to a Base64 image with the specified intensity.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a float value for the intensity between -100 and 100 to control the warmth of the image.

A value of -100 results in the coldest effect (bluish tones), while a value of 100 results in the warmest effect (reddish tones).

This block returns a new Base64 encoded image with the warmth effect applied.

The calculateColorMatrixValues block calculates the color transformation matrix based on the input temperature, which is derived from the input intensity. It adjusts the red, green, and blue channels of the image to achieve the desired warmth effect.

710920591



879194935

728585860







component_method (13)

his block, ApplyXProcess, applies an X-process effect to a Base64 image with the specified intensity.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a float value for intensity between -100 and 100 to control the intensity of the X-process effect.

A value of -100 results in the lowest intensity, while a value of 100 results in the highest intensity.

This block returns a new Base64 encoded image with the X-process effect applied.

The ApplyXProcess block creates two ColorMatrix instances, one for contrast and one for the X-process effect.

The contrast matrix scales the input image's color channels based on the given intensity, while the X-process matrix adds a cross-color effect by modifying the color channels based on the intensity.

These matrices are concatenated and applied to the source image using the ColorMatrixColorFilter class, which modifies the output image's colors based on the specified matrices.

710920591




997631424

243269926







This block CompressImageBase64 , is a handy feature of the "Creative Image Transformer" that allows you to compress your images by resizing their height while maintaining their original aspect ratio. This block helps in optimizing images for faster performance and lower file sizes.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input an integer value for newHeight as the desired height for the resized image.

This block returns a new Base64 encoded image with the specified height and the original aspect ratio maintained.

The CompressImageBase64 block first decodes the input Base64 image into a Bitmap. It calculates the new width based on the input image's aspect ratio and the desired new height. The input image is then resized using the calculated dimensions, creating a new Bitmap. Finally, the resized Bitmap is encoded back into a Base64 string and returned.







This block, EncodeImageToBase64, converts an image file from the local path into a Base64 encoded string with optional resizing and compression.

How to use it:

  • Input the local image path as imagePath.

  • Input an integer for maxDimension to resize the image. The image will be resized so that the width and height do not exceed this value.

  • Input an integer for compressionQuality
    (between 0 and 100Preformatted text Preformatted textPreformatted text) to control the compression level.

Lower values result in higher compression and smaller file sizes, while higher values result in lower compression and larger file sizes.

This block returns the Base64 encoded image string.







This block EncodeImageToBase64WithCompression,is a practical feature of the "Creative Image Transformer" that allows you to encode an image from the local file system into its Base64 representation with optional compression. This block is useful for converting images into a format that can be easily transmitted or stored.

How to use it:

  • Input a string as imagePath containing the local path to the image file.
  • Input an integer value for compressionQuality to control the compression quality (0-100) when encoding the image. Lower values result in higher compression, smaller file sizes, and lower image quality.

This block returns a new Base64 encoded image with the specified compression quality applied.

The EncodeImageToBase64WithCompression block first tries to open an InputStream for the image file at the specified local path. If the file is not found, it returns an empty string. Next, the block decodes the InputStream into a Bitmap. A ByteArrayOutputStream is then used to compress the Bitmap with the specified compression quality as a JPEG. The compressed byte array is then encoded into a Base64 string and returned.






This block, GetImageDimensions, retrieves the width and height of a Base64 encoded image.

How to use it:

  • Input a Base64 encoded image string as base64Image.

This block returns a YailList containing two elements: the width and height of the image.

The GetImageDimensions block first decodes the Base64 image string using Base64.decode. Then, it creates a BitmapFactory.Options object with the inJustDecodeBounds property set to true.

This allows the function to obtain the dimensions of the input image without actually decoding the image data and allocating memory for the Bitmap. The dimensions are then extracted from the BitmapFactory.Options object and returned as a YailList.







This block, SaveBase64ImageToFile, saves a Base64 encoded image to a file with the given filename and extension in the /Download directory.

How to use it:

  • Input a Base64 encoded image string as base64Image.
  • Input a string value for fileName to specify the desired filename for the saved image.
  • Input a string value for fileExtension to specify the desired file format for the saved image (e.g., "jpg", "png", or "webp").

This block returns the saved file's path if successful or an empty string otherwise.

The SaveBase64ImageToFile block first decodes the Base64 image string to a Bitmap. Then, it creates the /Download directory if it doesn't exist. Next, it saves the image as a file with the specified filename and extension using the appropriate Bitmap.CompressFormat based on the input file extension.

The block returns the saved file's absolute path if the operation is successful or an empty string in case of errors.







This block ApplyGlitchArtEffect ,is an artistic feature of the "Creative Image Transformer" that allows you to apply a Glitch Art effect to your images. This block creates visually intriguing images with a combination of color channel shifts, giving your images a unique and eye-catching appearance.

How to use it:

  • Input a Base64 encoded image string as base64Image.

This block returns a new Base64 encoded image with the Glitch Art effect applied.
710920591

501238892






The first Java function, MakeColorTransparent, takes a Base64-encoded image, a target color, and a tolerance as input. It converts the image to a Bitmap object, iterates through each pixel, and checks if the color difference between the current pixel color and the target color is within the specified tolerance. If it is, the pixel color is set to transparent; otherwise, it remains unchanged. The resulting image is encoded back to Base64 and returned.

You have the option to utilize the canvas component, where upon touching a specific color, the block will eliminate that color and render it transparent.

Example for making red color transparent with tolerance value 100 :point_down:












The second Java function, ExtractColorsFromImage, takes a Base64-encoded image as input. It converts the image to a Bitmap object, iterates through each pixel, and collects unique colors in a set. Then, it converts the set of colors to a list of hexadecimal color codes. Finally, it returns the list of all color codes in the image.







The ExtractColorsFromImageUrl function takes an image URL as input. It downloads the image, extracts the unique colors from it, converts them to hex code colors, and triggers the ColorsExtracted event with the resulting list of colors.







component_event (2)

The ColorsExtracted event is triggered when the colors have been extracted from the image URL. It sends the extracted colors as a YailList to the event listeners.







The ConvertImageUrlToBase64 function converts an image from a specified URL to a Base64 encoded string. It downloads the image, decodes it into a Bitmap, converts the Bitmap to Base64 encoding, and triggers the ImageConvertedToBase64 event with the resulting Base64 string.






The ImageConvertedToBase64 event is triggered when the image has been successfully converted to a Base64 encoded string. It dispatches the event with the Base64 string as a parameter.







ReplaceColor : This function replaces a specific color area in a Base64-encoded image with another color. It takes the input image in Base64 format, the target color to be replaced, the replacement color, and a tolerance value. It decodes the input image, creates an output bitmap with the same dimensions, and iterates through each pixel of the input image. It calculates the color difference between the current pixel color and the target color and checks if the difference is within the tolerance. If it is, the pixel color is replaced with the replacement color; otherwise, the pixel color remains the same. Finally, the modified image is encoded back to Base64 format and returned.

Examples:


original image


affected images :







ReplaceColorWithImage: This function replaces a specific color area in a Base64-encoded image with another image specified by its Base64 code. It takes the input image in Base64 format, the target color, the replacement image in Base64 format, and a tolerance value. It decodes both the input image and the replacement image, creates an output bitmap with the same dimensions, and iterates through each pixel of the input image. It calculates the color difference between the current pixel color and the target color and checks if the difference is within the tolerance. If it is, the pixel color is replaced with the corresponding pixel from the replacement image. If the replacement image is smaller than the input image, it wraps around to repeat the replacement pattern. If the difference is not within the tolerance, the pixel color remains the same. Finally, the modified image is encoded back to Base64 format and returned.

Example:
original image


Affected image:


Video

AIA and AIX files

you can buy both of them in zip file both of the costs 8$ via PayPal , after you complete your payment you will be directly redirected to download URL to download you zip file . pay here :point_down:t5:

if you do not have PayPal you can PM me to get solution .

Note :

AIA Project is for Kodular try it with kodular

Thanks

this extension was created by Mr_Koder

enjoy :wink:

4 Likes

The existing blocks have been enhanced with new features, while certain older blocks have been modified to deliver superior performance.

I made a PayPal transfer to buy this extension, but did not get the link to download the aix file.
Did anyone already tried this exetension?
Thanks
Jacques D.

I have PMed you with the download URL Check it please in your messages and I am sorry for this experience
However the payment it directes to the download in the correct way
have a good day and thanks for buying my extension

Note

the file is zip file contains aix file and aia file

you can check the demo AIA file as a test for this extension

Thanks for the link.

When I try to load your project (.aia), I get an error:

This project was saved with a newer version of the App Inventor system. We will attempt to load the project, but there may be compatibility issues.

and the project is not loaded

I use the standard App inventor @: https://ai2.appinventor.mit.edu/

Thanks for your feedback

Jacques

AIA Project is for Kodular try it with kodular

better to please provide an aia for App Inventor for users to OUR community to test. :wink:

2 Likes

I am using App Inventor. Could you provide the App inventor aia and confirm your extension is working for App Inventor?
Thanks

@Jacques_Dumarest I will create another one for AI2 but it will take some time cause I am busy with my University at these days but you can test the aia with kodular even with free plan just upload it to kodular and see how the extension works

I created it with kodular cause AI2 doesn't have some features like kodular so l used kodular to facilitate to create the aia but in AI2 I will have to use additional Extensions to be equivalent to kodular but I will create simple one for AI2

1 Like

Thanks
I started to use your extension. It works fine.
However it is very slow. Is there a way to speed up the process? Using Base64 encoding may impact the perf, any reason to use it?

That depends on the image size ,you can compress the image before applying effects using this block

after that, you can store all applied effects in a variable and then apply it to the original image

Yes, you are right, it definitively depends on image size.
What is not clear for me is what type of compression you are using? Do you resize (reduce image resolution) or compress it using JPEG or other compression scheme?
Also if you compress the image (JPEG or other), to process the image, you'll need to first decompress it, process it and re-compress it, so it will not reduce the processing time, but increas it. Compression reduces the footprint of the image, but not the processing time?
Do you know the impact of Base64 encoding on the preformance?
Can you share which image processing library you are using in your extension: OpenCV? ....
Thanks a lot

I use two methods to compress image
1st: CompressImageBase64

this one compresses an image loaded from a local file path by resizing its height while maintaining its aspect ratio.

Libraries Used:

  • BitmapFactory: This library is part of Android's standard libraries and is used to decode image files into Bitmap objects.
  • ByteArrayOutputStream: Another standard Java library used to store binary data as bytes before encoding it.
  • Base64: This library provides encoding and decoding methods for Base64 data.

2nd: EncodeImageToBase64WithCompression

This function is very similar to the previous one, but it adds the capability to specify a compression level when encoding the resized image.

Libraries Used:

  • BitmapFactory: Same as in the previous function.
  • ByteArrayOutputStream: Same as in the previous function.
  • Base64: Same as in the previous function.

The difference between the two functions lies in the encoding part. In the second function, the Bitmap.CompressFormat.JPEG format is used for encoding instead of the default Bitmap.CompressFormat.PNG format. This format supports specifying a compression level ranging from 0 to 100, with 100 being the least compressed and highest quality. Lower compression levels result in smaller file sizes but potentially lower image quality.
this is libraries that i use

@UsesLibraries(libraries = "renderscript-v8.jar,opencv-2.4.1.jar,tensorflow-1.15.0.jar,tensorflow-lite-2.12.0.jar")

However I don't use OpenCV in compressing methods

this is how to use "Image Editor Extension" to apply effects with large sized image

  1. Generate a Preview Image:
  • Create a preview picture from the original when the user chooses an image. This preview picture was produced using image resizing methods. You may, for instance, reduce the original image's resolution to 25% of its original size.
  1. Apply Effects to the Preview Image:
  • Apply the desired effects (blur, sharpen, brightness, etc.) to the preview image. Since the image is smaller and of lower quality, these operations will be faster.
  1. Store the Effect Parameters:
  • Keep track of the parameters used for each effect applied to the preview image. For example, if you applied a blur with a certain radius, keep that radius value.
    I recommend using a list to store effects values.
  1. Apply Effects to the Original Image:
  • You may now apply the same effects on the original high-quality image as you did to the preview image after applying all desired effects to the preview image. However, utilize the settings that were applied to the preview picture when applying the effects to the real image.

This way, you achieve two goals:

  • Faster preview and interaction with the smaller, lower-quality image.
  • Consistency in applying effects to the original image based on the parameters used for the preview image.

With your extension, is it possible to modifiy an image used as arrangement.Image ?