Black Bar Cinema Scope:
The BlackBarCinemaScope node is designed to enhance your images by adding cinematic black bars, commonly known as letterboxing, to achieve widescreen aspect ratios. This node is particularly useful for artists and creators who want to give their images a cinematic feel, reminiscent of movies and high-definition video content. By applying these black bars, the node helps fit any source image into common cinematic aspect ratios, such as 16:9, 2.35:1, and others, without distorting the original image. This feature is beneficial for maintaining the artistic integrity of your work while adapting it to various display formats. The node supports both letterboxing (adding bars to the top and bottom) and pillarboxing (adding bars to the sides), ensuring that your images can be seamlessly integrated into any widescreen format.
Black Bar Cinema Scope Input Parameters:
image
The image parameter is the input image to which you want to apply the cinematic black bars. It should be provided as a 4D tensor with dimensions representing batch size, height, width, and channels. This parameter is crucial as it serves as the base upon which the node will apply the letterboxing or pillarboxing effect.
aspect_ratio
The aspect_ratio parameter allows you to select the target cinematic aspect ratio for your image. It offers a list of predefined options such as "16:9 (HD/UHD)", "2.35:1 (Scope/Cinemascope)", and others. The default value is "16:9 (HD/UHD)". This parameter determines the final appearance of your image by defining the width-to-height ratio that the node will aim to achieve through the addition of black bars.
custom_ratio_width
The custom_ratio_width parameter is an optional float value that allows you to specify a custom aspect ratio width. It ranges from 0.0 to 10.0, with a default value of 0.0. If both custom_ratio_width and custom_ratio_height are set to values greater than 0, they will override the preset aspect ratios, giving you full control over the desired aspect ratio.
custom_ratio_height
The custom_ratio_height parameter is an optional float value that allows you to specify a custom aspect ratio height. It ranges from 0.0 to 10.0, with a default value of 0.0. Similar to custom_ratio_width, setting this parameter along with custom_ratio_width to values greater than 0 will override the preset aspect ratios, allowing for a customized widescreen effect.
Black Bar Cinema Scope Output Parameters:
image
The image output parameter provides the modified image with the applied cinematic black bars. This output retains the original content of the input image while adding the necessary black bars to achieve the selected aspect ratio. It is useful for artists who want to present their work in a cinematic format without altering the core visual elements.
bar_mask
The bar_mask output parameter is a mask that indicates the regions where the black bars have been applied. It is a binary mask with values of 1.0 where the bars are present and 0.0 where the original image content is visible. This mask can be used for further processing or analysis, such as identifying the areas of the image that have been altered by the node.
Black Bar Cinema Scope Usage Tips:
- To achieve a classic cinematic look, select an aspect ratio like "2.35:1 (Scope/Cinemascope)" which is commonly used in films.
- Use the
custom_ratio_widthandcustom_ratio_heightparameters to create unique aspect ratios that fit specific artistic visions or display requirements.
Black Bar Cinema Scope Common Errors and Solutions:
Expected 4D tensor (B,H,W,C), got <image.dim()>D
- Explanation: This error occurs when the input image does not have the expected 4D tensor format.
- Solution: Ensure that your input image is formatted as a 4D tensor with dimensions representing batch size, height, width, and channels.
Invalid aspect ratio selection
- Explanation: This error might occur if an aspect ratio is selected that is not available in the predefined list or if custom ratios are incorrectly set.
- Solution: Verify that the aspect ratio selected is from the available options or ensure that both
custom_ratio_widthandcustom_ratio_heightare set correctly to override the presets.
