from PIL import ImageDraw, ImageFont # Load the cropped image again cropped_img = cropped_img.convert("RGB") # Increase the size of the text and arrow for better visibility draw = ImageDraw.Draw(cropped_img) # Define font for the text (this part assumes default fonts available in PIL) # Without access to specific fonts like Korean fonts, we will use a default available font try: font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 60) except IOError: font = ImageFont.load_default() # Text content and position text = "후라이 글 떴상하니까 구독 눌러주세요" text_position = (50, 100) # Arrow coordinates arrow_shape = [(600, 300), (750, 350)] # Draw the text in black for high contrast draw.text(text_position, text, font=font, fill="black") # Draw a thicker black arrow to make it clearer draw.line(arrow_shape, fill="black", width=15) # Resize it again on a YouTube banner size background to center it new_background_with_text = Image.new('RGB', banner_size, (255, 255, 0)) # Yellow background new_paste_position = ((banner_size[0] - cropped_img.size[0]) // 2, (banner_size[1] - cropped_img.size[1]) // 2) new_background_with_text.paste(cropped_img, new_paste_position) # Save the final image final_img_with_text_path = '/mnt/data/final_youtube_banner_with_text_and_arrow.png' new_background_with_text.save(final_img_with_text_path) final_img_with_text_path # Output the path to the final image with larger text and arrow