Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts images to Base64 for embedding in HTML/JSON, aiding AI artists in web apps, data storage, and transmission.
The LoadImageToBase64
node is designed to convert an image into a Base64-encoded string, making it easy to embed images directly into HTML or JSON without needing to reference external files. This node is particularly useful for AI artists who want to quickly convert images for web applications, data storage, or transmission over text-based protocols. By transforming images into Base64 strings, you can ensure that the image data remains intact and easily accessible, simplifying the process of sharing and displaying images in various digital formats.
The image
parameter is the input image that you want to convert to a Base64-encoded string. This parameter accepts an image in a format that can be processed by the node, such as a tensor representation of the image. The image is first loaded and processed to ensure it is in the correct format (RGBA), and any necessary transformations are applied. This parameter is crucial as it determines the source image that will be encoded into Base64.
The base64Images
output parameter is a string that contains the Base64-encoded representation of the input image. This string can be directly embedded into HTML or JSON, making it easy to share and display the image without needing to reference an external file. The Base64 string is prefixed with data:image/png;base64,
to indicate that it is a PNG image.
The IMAGE
output parameter is the processed image tensor that was used to generate the Base64 string. This output allows you to further manipulate or use the image in subsequent nodes or processes within your workflow.
The MASK
output parameter is a tensor representing the mask of the image. If the image contains an alpha channel, the mask will be derived from it. Otherwise, a default mask is generated. This mask can be used for various image processing tasks, such as segmentation or masking specific parts of the image.
base64Images
output to easily embed images in web pages or JSON data without needing to reference external files.IMAGE
and MASK
outputs for further image processing tasks within your workflow.© Copyright 2024 RunComfy. All Rights Reserved.