diff --git a/3_background_dark.mp4 b/3_background_dark.mp4 new file mode 100644 index 0000000..d7cf8a2 --- /dev/null +++ b/3_background_dark.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb49664ba1dd9238a12c1f737a1818afcb6e45e529884f3de5443f4fb28020b7 +size 14629010 diff --git a/Bach Cello Suite No. 1, G Major, Prelude - Cooper Cannell.mp3 b/Bach Cello Suite No. 1, G Major, Prelude - Cooper Cannell.mp3 new file mode 100644 index 0000000..471c25f --- /dev/null +++ b/Bach Cello Suite No. 1, G Major, Prelude - Cooper Cannell.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9f0eea8822a1dd24cc6ae8422b5b12a66590b8e51d590c835c86402e6df2e7e +size 4083498 diff --git a/C Major Prelude - Bach.mp3 b/C Major Prelude - Bach.mp3 new file mode 100644 index 0000000..ea2d227 --- /dev/null +++ b/C Major Prelude - Bach.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49a8a906683b5f0464f8747fb7ce2f2d0c123a4b3cd2b280cbf070bc4b794162 +size 5329176 diff --git a/MOTDFrame/0editDesc.lnk b/MOTDFrame/0editDesc.lnk new file mode 100644 index 0000000..5489a63 Binary files /dev/null and b/MOTDFrame/0editDesc.lnk differ diff --git a/MOTDFrame/FrameTool.bat b/MOTDFrame/FrameTool.bat new file mode 100644 index 0000000..117efbc --- /dev/null +++ b/MOTDFrame/FrameTool.bat @@ -0,0 +1,29 @@ +@echo off +REM Check if Python is installed +where python >nul 2>&1 +if errorlevel 1 ( + echo Python is not installed or not in PATH. + pause + exit /b +) + +REM Check if a file was dragged onto the script +if "%~1"=="" ( + echo No image file was dragged onto the script. + pause + exit /b +) + +REM Get the frame image path +set "frame_image_path=MOTDFrame.png" REM Path to the frame image + +REM Get the directory of the batch file +set "script_dir=%~dp0" + +REM Run the Python script with all dragged images and the frame image +python "%script_dir%FrameTool.py" %* "%script_dir%%frame_image_path%" + +REM Run Thumbs.py after FrameTool.py finishes without passing any arguments +python "%script_dir%Thumbs.py" + +pause \ No newline at end of file diff --git a/MOTDFrame/FrameTool.py b/MOTDFrame/FrameTool.py new file mode 100644 index 0000000..1dc0fb6 --- /dev/null +++ b/MOTDFrame/FrameTool.py @@ -0,0 +1,118 @@ +import os +import sys +from PIL import Image + +def process_image(input_image_path, frame_image_path, output_path): + """ + Process the input image and frame, creating a simple composite PNG + + Args: + input_image_path: Path to the input image + frame_image_path: Path to the frame image (PNG with transparency) + output_path: Path where the output will be saved + + Returns: + True if successful, False otherwise + """ + try: + # Open the images + print(f"Opening input image: {input_image_path}") + input_image = Image.open(input_image_path).convert("RGBA") + + print(f"Opening frame image: {frame_image_path}") + frame_image = Image.open(frame_image_path).convert("RGBA") + + # Get dimensions of the frame + frame_width, frame_height = frame_image.size + print(f"Frame dimensions: {frame_width}x{frame_height}") + + # Resize input image to 904x904 + input_image = input_image.resize((904, 904), Image.LANCZOS) + + # Calculate position to center the input image + input_width, input_height = input_image.size + input_x = (frame_width - input_width) // 2 + input_y = (frame_height - input_height) // 2 + + # Position the input image on a transparent background + positioned_input = Image.new("RGBA", (frame_width, frame_height), (0, 0, 0, 0)) + positioned_input.paste(input_image, (input_x, input_y)) + + # Create a composite image + composite = Image.new("RGBA", (frame_width, frame_height), (0, 0, 0, 0)) + composite.paste(positioned_input, (0, 0)) + composite.paste(frame_image, (0, 0), frame_image) + + # Save the composite image + composite.save(output_path, "PNG") + print(f"Saved composite image: {output_path}") + + return True + except Exception as e: + print(f"Error processing image: {e}") + import traceback + traceback.print_exc() + return False + +def main(): + # Print command line arguments for debugging + print(f"Command line arguments: {sys.argv}") + + # Check if at least one input image is provided + if len(sys.argv) < 3: + print("Usage: python FrameTool.py ") + print(" or: python FrameTool.py ... ") + return + + # Get the frame image path from the last argument + frame_image_path = sys.argv[-1] # The last argument is the frame image + print(f"Frame image path: {frame_image_path}") + + # Check if the frame image exists + if not os.path.exists(frame_image_path): + print(f"Frame image not found: {frame_image_path}") + return + + # Get the directory of the script for output + script_dir = os.path.dirname(os.path.abspath(__file__)) + print(f"Script directory: {script_dir}") + + # Process each input image + input_images = sys.argv[1:-1] # Exclude the last argument (frame image path) + print(f"Input images to process: {input_images}") + + for input_image_path in input_images: + # Check if the input image exists + if not os.path.exists(input_image_path): + print(f"Input image not found: {input_image_path}") + continue + + print(f"Processing input image: {input_image_path}") + + # Generate a unique output image path in the script directory + output_image_path = os.path.join(script_dir, "output.png") # Start with output.png + + # Ensure the output file does not overwrite existing files + counter = 1 + while os.path.exists(output_image_path): + output_image_path = os.path.join(script_dir, f"output_{counter}.png") + counter += 1 + + print(f"Output image path: {output_image_path}") + + # Process the image + success = process_image(input_image_path, frame_image_path, output_image_path) + + if success: + print(f"Successfully processed and saved {input_image_path}.") + else: + print(f"Failed to process {input_image_path}.") + +# Add a try-except block to catch and print any errors +if __name__ == "__main__": + try: + main() + except Exception as e: + print(f"Error in main: {e}") + import traceback + traceback.print_exc() \ No newline at end of file diff --git a/MOTDFrame/FrameTool_instacorrupt.py b/MOTDFrame/FrameTool_instacorrupt.py new file mode 100644 index 0000000..f05ff86 --- /dev/null +++ b/MOTDFrame/FrameTool_instacorrupt.py @@ -0,0 +1,110 @@ +import cv2 +import os +import sys +import numpy as np + +def fit_image_to_frame(input_image_path, frame_image_path): + try: + # Read the input image and the frame image + input_image = cv2.imread(input_image_path, cv2.IMREAD_UNCHANGED) # Read with alpha channel if present + frame_image = cv2.imread(frame_image_path, cv2.IMREAD_UNCHANGED) # Read with alpha channel if present + + # Check if images were loaded successfully + if input_image is None or frame_image is None: + raise ValueError("Error loading images. Please check the file paths.") + + # Print the shapes and types for debugging + print(f"Input image shape: {input_image.shape}, Frame image shape: {frame_image.shape}") + + # Resize the input image to 904x904 + input_image = cv2.resize(input_image, (904, 904), interpolation=cv2.INTER_LANCZOS4) + + # Create a new image with the same size as the frame + combined_image = np.zeros_like(frame_image) # Initialize with zeros (black background) + + # Calculate position to center the input image + input_x = (frame_image.shape[1] - input_image.shape[1]) // 2 + input_y = (frame_image.shape[0] - input_image.shape[0]) // 2 + + # First, place the input image in the center of the combined image + if input_image.shape[2] == 4: # RGBA + # For RGBA images, we need to handle the alpha channel + for c in range(0, 3): # For each color channel (RGB) + combined_image[input_y:input_y + input_image.shape[0], input_x:input_x + input_image.shape[1], c] = input_image[:, :, c] + # Copy the alpha channel + combined_image[input_y:input_y + input_image.shape[0], input_x:input_x + input_image.shape[1], 3] = input_image[:, :, 3] + else: # RGB + # For RGB images, we need to create an alpha channel + for c in range(0, 3): # For each color channel (RGB) + combined_image[input_y:input_y + input_image.shape[0], input_x:input_x + input_image.shape[1], c] = input_image[:, :, c] + # Set the alpha channel to fully opaque + combined_image[input_y:input_y + input_image.shape[0], input_x:input_x + input_image.shape[1], 3] = 255 + + # Now, overlay the frame on top of the combined image + # The frame's alpha channel will determine how much of the input image shows through + frame_alpha = frame_image[:, :, 3] / 255.0 # Normalize alpha channel to [0, 1] + for c in range(0, 3): # For each color channel (RGB) + combined_image[:, :, c] = (1 - frame_alpha) * combined_image[:, :, c] + frame_alpha * frame_image[:, :, c] + + # Ensure the alpha channel is preserved + combined_image[:, :, 3] = np.maximum(combined_image[:, :, 3], frame_image[:, :, 3]) + + return combined_image # Return the combined image + + except Exception as e: + print(f"Error: {e}") # Print the error message for debugging + return None # Return None if there was an error + +def save_as_jpg(output_image, output_path, quality=95): + # Save the combined image as a JPG file with specified quality + # JPG doesn't support alpha channel, so we need to convert to BGR + if output_image.shape[2] == 4: # If RGBA + # Create white background + background = np.ones_like(output_image, dtype=np.uint8) * 255 + # Only use RGB channels for JPG + mask = output_image[:,:,3:] / 255.0 + output_image_rgb = output_image[:,:,:3] + background[:,:,:3] = background[:,:,:3] * (1 - mask) + output_image_rgb * mask + # Save as JPG + cv2.imwrite(output_path, background[:,:,:3], [cv2.IMWRITE_JPEG_QUALITY, quality]) + else: + # Save as JPG + cv2.imwrite(output_path, output_image, [cv2.IMWRITE_JPEG_QUALITY, quality]) + +if __name__ == "__main__": + # Check if at least one input image is provided + if len(sys.argv) < 3: # Ensure at least one input image and one frame image + print("Usage: python FrameTool.py ... ") + sys.exit(1) + + # Get the frame image path from the last argument + frame_image_path = sys.argv[-1] # The last argument is the frame image + + # Check if the frame image exists + if not os.path.exists(frame_image_path): + print(f"Frame image not found: {frame_image_path}") + sys.exit(1) + + # Get the directory of the script for output + script_dir = os.path.dirname(os.path.abspath(__file__)) + + # Process each input image + for input_image_path in sys.argv[1:-1]: # Exclude the last argument (frame image path) + # Generate a unique output image path in the script directory + output_image_path = os.path.join(script_dir, "output.jpg") # Start with output.jpg + + # Ensure the output file does not overwrite existing files + counter = 1 + while os.path.exists(output_image_path): + output_image_path = os.path.join(script_dir, f"output_{counter}.jpg") + counter += 1 + + # Call the function to fit the image to the frame + combined_image = fit_image_to_frame(input_image_path, frame_image_path) + + # Save the combined image if it was created successfully + if combined_image is not None: + save_as_jpg(combined_image, output_image_path) # Save the combined image as JPG + print(f"JPG saved successfully at: {output_image_path}") # Log success + else: + print(f"Failed to process {input_image_path}.") \ No newline at end of file diff --git a/MOTDFrame/MOTDFrame.png b/MOTDFrame/MOTDFrame.png new file mode 100644 index 0000000..8df91e7 --- /dev/null +++ b/MOTDFrame/MOTDFrame.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aaabe85373bad292e6cffae4cc47e15b4aa49223684aa4799978f2b3b42e66ac +size 3651432 diff --git a/MOTDFrame/RainyStill.png b/MOTDFrame/RainyStill.png new file mode 100644 index 0000000..9414646 --- /dev/null +++ b/MOTDFrame/RainyStill.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a4af07994125b1d87f878b7f949db457554230b0b43fd318f06928542de1753 +size 982104 diff --git a/MOTDFrame/Thumbs.py b/MOTDFrame/Thumbs.py new file mode 100644 index 0000000..8217012 --- /dev/null +++ b/MOTDFrame/Thumbs.py @@ -0,0 +1,84 @@ +from PIL import Image +import os +import sys +import glob + +def create_thumbnail(input_image_path, background_path, rainy_still_path): + try: + print(f"Processing input image: {input_image_path}") + # Open the images and ensure they are in RGBA mode + input_image = Image.open(input_image_path).convert("RGBA") + background_image = Image.open(background_path).convert("RGBA") + rainy_still_image = Image.open(rainy_still_path).convert("RGBA") + + # Scale the input image up by 5% + scaled_width = int(input_image.width * 1.05) + scaled_height = int(input_image.height * 1.05) + input_image = input_image.resize((scaled_width, scaled_height), Image.LANCZOS) + + # Create a new image with the same size as the background + combined_image = Image.new('RGBA', background_image.size) + + # Paste the background + combined_image.paste(background_image, (0, 0)) + + # Calculate position to center the input image + input_x = (combined_image.width - input_image.width) // 2 + input_y = (combined_image.height - input_image.height) // 2 + + # Paste the input image on top + combined_image.paste(input_image, (input_x, input_y), input_image) + + # Move RainyStill down and to the right by 783 pixels + rainy_still_position = (783, 783) # Adjust as needed + combined_image.paste(rainy_still_image, rainy_still_position, rainy_still_image) + + return combined_image # Return the combined image + + except Exception as e: + print(f"Error: {e}") # Print the error message for debugging + return None # Return None if there was an error + +if __name__ == "__main__": + # Define the paths for the background and RainyStill images + script_dir = os.path.dirname(os.path.abspath(__file__)) + background_path = os.path.join(script_dir, "background.png") + rainy_still_path = os.path.join(script_dir, "RainyStill.png") + + # Check if the background and RainyStill images exist + if not os.path.exists(background_path): + print(f"Background image not found: {background_path}") + sys.exit(1) + + if not os.path.exists(rainy_still_path): + print(f"RainyStill image not found: {rainy_still_path}") + sys.exit(1) + + # Find all output* files in the current directory + output_files = glob.glob(os.path.join(script_dir, "output*")) + + # Process each output file + for input_image_path in output_files: + # Generate a unique output image path in the script directory + output_image_path = os.path.join(script_dir, "output_thumb.jpg") # Start with output_thumb.jpg + + # Ensure the output file does not overwrite existing files + counter = 1 + while os.path.exists(output_image_path): + output_image_path = os.path.join(script_dir, f"output_thumb_{counter}.jpg") + counter += 1 + + # Call the function to create the thumbnail + combined_image = create_thumbnail(input_image_path, background_path, rainy_still_path) + + # Save the combined image if it was created successfully + if combined_image is not None: + # Convert to RGB mode for JPG (JPG doesn't support alpha) + rgb_image = Image.new("RGB", combined_image.size, (255, 255, 255)) + rgb_image.paste(combined_image, mask=combined_image.split()[3]) # Use alpha as mask + + # Save as JPG with quality parameter to control file size + rgb_image.save(output_image_path, format='JPEG', quality=100) # Higher quality for better image fidelity + print(f"JPG saved successfully at: {output_image_path}") # Log success + else: + print(f"Failed to process {input_image_path}.") \ No newline at end of file diff --git a/MOTDFrame/background.png b/MOTDFrame/background.png new file mode 100644 index 0000000..41e650c --- /dev/null +++ b/MOTDFrame/background.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6034954249c4fb1911603c6b7361ca543a2468cf0c4d2baa7011f4a568542b4e +size 8813629 diff --git a/MOTDFrame/background_light.png b/MOTDFrame/background_light.png new file mode 100644 index 0000000..c59d2ae --- /dev/null +++ b/MOTDFrame/background_light.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93f09052f2340abd5113274b1ff71903052e6c6f2ec07bc45d20c850b9b0f11f +size 12463299 diff --git a/MOTDFrame/dependencies.bat b/MOTDFrame/dependencies.bat new file mode 100644 index 0000000..8c6286e --- /dev/null +++ b/MOTDFrame/dependencies.bat @@ -0,0 +1,9 @@ +@echo off +echo Installing required Python packages... + +pip install Pillow +pip install psd-tools +pip install psd-tools2 + +echo All dependencies have been installed. +pause \ No newline at end of file diff --git a/StartupScreen.mp4 b/StartupScreen.mp4 new file mode 100644 index 0000000..8d0a916 --- /dev/null +++ b/StartupScreen.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:798f2550d015a32009df1920aa73a1d9d7321edd374668f83282792a4ff36910 +size 166120406 diff --git a/StartupScreen_dark.mp4 b/StartupScreen_dark.mp4 new file mode 100644 index 0000000..c4d2535 --- /dev/null +++ b/StartupScreen_dark.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b80ad5011567a53ca496cd99a6459223c1979d499701421e40c397a0973d9cf +size 579891726 diff --git a/background_1080.mp4 b/background_1080.mp4 new file mode 100644 index 0000000..ca5b19b --- /dev/null +++ b/background_1080.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:836afbe6acc8961e70a27abe51da034446833cdd9d60718cfb560f89a702f0f0 +size 148543636 diff --git a/fin_goodbye.mp4 b/fin_goodbye.mp4 new file mode 100644 index 0000000..49a27df --- /dev/null +++ b/fin_goodbye.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecba664a6588af3cb18458a755eec985d6105f7fcb529df72a7ee1973d0d3a77 +size 392033267