Phase 03 functional tools - #5
Merged
Merged
Conversation
- Add VideoToGifPanel with comprehensive video conversion controls - Add RotatePanel with angle selection, flip options, and quality controls - Add CropPanel with coordinate inputs, presets, and crop modes - Integrate tool panels with main application via dialog system - Implement actual file processing with background threading - Connect GUI controls to core library functions - Add proper error handling and progress tracking - Support for 5 fully functional tools: Video to GIF, Resize, Add Text, Rotate, Crop GUI now has working tool dialogs with real file processing capabilities.
- Remove unused add_text_watermark_to_gif import - Fix task_done() being called too many times in threading - Add proper task validation before calling task_done() - Add kwargs parameter to task processing - Improve error handling in background worker GUI should now run without import or threading errors.
- Add SplitPanel with frame extraction options (all, range, every_nth, key_frames) - Add MergePanel with file list management and merge modes (sequential, horizontal, vertical) - Add ReversePanel with reverse options (simple, ping-pong, custom pattern) - Add OptimizePanel with optimization levels and advanced settings - Integrate all new panels with main application dialog system - Add tool execution methods for split, merge, reverse, and optimize - Update menu handlers to use new functional dialogs Now 9/17 tools are fully functional with professional GUI dialogs.
…nd-drop - Create RearrangePanel with frame preview and drag-and-drop functionality - Show all GIF frames as thumbnails in scrollable canvas - Allow frame selection with Ctrl+click for multiple selection - Implement drag-and-drop reordering of frames - Add frame controls: select all, clear selection, reset order, duplicate, remove - Simplify all other tools to show 'Coming Soon' messages - Focus application on single functional tool: Rearrange - Remove unused tool panels and imports - Update main application to only handle rearrange tool The application now has one fully functional tool with professional frame preview and reordering capabilities.
- Change horizontal scrolling to vertical scrolling for better frame navigation - Add quick selection range fields (From/To) for selecting frame ranges like 1-100 - Arrange frames in 5-column vertical grid layout instead of horizontal row - Update drag-and-drop logic to work with vertical layout - Add select_range method for quick range selection - Improve canvas height and scrollbar positioning - Update frame positioning calculations for vertical grid The rearrange tool now has vertical scrolling and quick range selection capabilities.
- Fix frames not loading in preview area by calling display_frames() after loading - Auto-load GIF file from main dashboard when opening rearrange dialog - Add canvas resize handling to properly update scroll region - Update load_gif method to accept optional file_path parameter - Fix canvas window sizing to match canvas width - Improve frame display reliability The rearrange tool now properly loads frames and uses the file selected in the main dashboard.
- Add mouse wheel scrolling support for canvas (Windows, MacOS, Linux) - Make dialog window resizable with minimum size constraints (800x700, min 600x500) - Add drop zone for placing selected frames at the end - Add visual feedback when frames are placed in drop zone - Improve user experience with better scrolling and window management - Add click handler for drop zone to move selected frames to end The rearrange tool now has proper scrolling, resizable window, and a drop zone for frame placement.
- Make frame preview columns dynamic based on window width - Add 3 drop zone options: Drop at Start, Drop at End, Drop at Specific Position - Add frame number input field for specific position (1-based, user-friendly) - Add visual feedback with status messages for each drop action - Update drag and drop logic to work with dynamic columns - Improve UX with clear instructions and error handling - Auto-redraw frames when window is resized The rearrange tool now has dynamic columns that adjust to window size and a comprehensive drop zone with multiple placement options.
- Fix frame selection logic to use grid indices instead of frame indices - Update on_frame_click to use grid_index parameter correctly - Update update_frame_display to check grid_index for selection state - Ensure frame selection works properly after rearrange operations Frame selection now works correctly after the first rearrange operation.
- Update frame labels to show both grid index and frame number - Format: '#1 Frame 1', '#231 Frame 231', etc. - Grid index shows current position in the reordered sequence - Frame number shows the original frame number from the GIF - Makes it easier to understand frame positions and relationships Frame labels now clearly show both the current position and original frame number.
- Disable optimization during frame rearrangement to prevent frame loss - Add proper GIF disposal and transparency parameters - Clean up temporary files after processing - Fix issue where only one frame was output after rearrangement - Ensure all frames are preserved in the reordered GIF The rearrange tool now properly outputs all frames in the reordered sequence.
- Disable optimization in image_processor.save_image calls - Improve frame duration handling with multiple fallbacks - Add debug output to track frame count during processing - Ensure all frames are preserved during rearrangement This should fix the single frame output issue by preventing optimization from removing frames.
- Add animated GIF detection in save_image method - Use save_all=True and proper GIF parameters for animated GIFs - Remove debug output now that issue is identified - Ensure all frames are preserved when saving animated GIFs The single frame output issue should now be completely resolved.
- Create VideoToGifPanel with full conversion settings - Add video file browser with format support (MP4, AVI, MOV, etc.) - Include FPS, duration, start time, quality, and resolution controls - Add advanced settings: loop count, optimization, aspect ratio - Integrate with main application and tool execution system - Add video info display showing duration, FPS, and dimensions - Support custom width/height with aspect ratio preservation The Video to GIF tool is now fully functional with a professional GUI interface.
- Fix argument order in video_to_gif_panel process_conversion method - Change from (tool_name, input_path, settings) to (tool_name, settings, input_file) - Add special handling for video to GIF output filename (.gif extension) - Ensure proper file path handling for video input files This fixes the 'argument should be a str or os.PathLike object' error.
- Add auto-optimization checkbox for files >100MB - Implement smart resolution/quality reduction algorithm - Show optimization dialog with proposed settings - Increase file size limit from 100MB to 500MB - Auto-reduce resolution, FPS, quality, and duration for large files - Calculate optimal settings based on file size - Prevent conversion failures due to file size limits Users can now convert large video files without manual optimization.
- Change from 'from moviepy import VideoFileClip' to 'from moviepy.editor import VideoFileClip' - Fix 'VideoFileClip' object has no attribute 'subclip' error - Update both core video_to_gif.py and video_to_gif_panel.py - Ensure compatibility with newer MoviePy versions This fixes the video conversion error and allows proper video processing.
- Revert to direct import: 'from moviepy import VideoFileClip' - Change subclip() to subclipped() method (correct for this version) - Fix both core video_to_gif.py and video_to_gif_panel.py - Ensure compatibility with installed MoviePy version 2.1.2 This fixes the ModuleNotFoundError and method not found errors.
- Add fallback values for video properties (duration, fps, size) - Use getattr() with defaults for missing properties - Fix resize() to resized() method calls - Handle missing video properties gracefully - Ensure compatibility with limited MoviePy 2.1.2 API This should resolve the 'resize' method not found error.
- Remove 'opt', 'program', 'verbose', 'logger' parameters from write_gif call - Use only basic 'fps' parameter for compatibility - This should resolve the 'unexpected keyword argument opt' error The MoviePy 2.1.2 version has a very limited write_gif API.
- Add progress callback support to Video to GIF and Rearrange tools - Implement real-time progress updates with status messages - Add button state management (disable during processing) - Add stop button to cancel ongoing operations - Update progress bar with detailed status messages - Disable all buttons during processing to prevent conflicts Progress updates now show: - Video to GIF: Loading, analyzing, processing, converting, saving - Rearrange: Loading, analyzing, rearranging frames, saving This fixes the progress bar not updating issue.
- Fix set_buttons_state method to work without tool_buttons dictionary - Use recursive widget traversal to find and disable all buttons - Add error handling for widget access - This resolves the AttributeError when disabling buttons during processing The error was caused by trying to access self.tool_buttons which doesn't exist. Now buttons are found and disabled recursively through the widget hierarchy.
- Add progress_callback parameter to convert_video_to_gif() function - Add progress_callback parameter to rearrange_gif_frames() function - Pass progress_callback through to the underlying converter classes - This resolves the 'unexpected keyword argument progress_callback' error The standalone functions now match the class method signatures and support progress callbacks for real-time GUI updates.
- Add detailed progress messages showing target vs actual duration - Improve video clipping verification with duration feedback - Add frame count calculation for precise duration control - Add final GIF duration verification after creation - Show actual GIF duration in progress messages This should help ensure the GIF duration matches the user's specified duration and provide better feedback about what's happening during conversion.
- Add actual_duration parameter to _convert_to_gif method signature - Pass actual_duration from convert method to _convert_to_gif - Update method docstring to include new parameter - This resolves the NameError: name 'actual_duration' is not defined The error was caused by trying to use actual_duration in _convert_to_gif without it being passed as a parameter.
- Remove 'program', 'verbose', and 'logger' parameters from write_gif - Use only basic 'fps' parameter for MoviePy 2.1.2 compatibility - This resolves the 'unexpected keyword argument program' error The MoviePy 2.1.2 version has a very limited write_gif API that only supports basic parameters like fps.
- Add progress callback support to resize_gif function and GifResizer class - Add detailed progress updates: loading, analyzing, resizing frames, saving - Update main application to handle resize tool execution - Open resize panel dialog instead of 'coming soon' message - Add resize tool to _execute_tool method with proper parameter mapping Progress updates show: - Loading GIF (0%) - Analyzing GIF (10%) - Resizing frames with frame count (20-70%) - Creating resized GIF (70%) - Saving resized GIF (80%) - Resize complete (100%) The resize tool is now fully functional with real-time progress feedback.
- Fix ResizePanel to inherit from ttk.Frame for proper pack() method - Add frame packing to ResizePanel setup_ui method - Add progress callback support to rotate_gif function and GifRotator class - Add detailed progress updates for rotate tool: loading, rotating frames, saving - Update main application to handle rotate tool execution - Open rotate panel dialog instead of 'coming soon' message Progress updates for rotate tool: - Loading GIF (0%) - Rotating GIF by X° (20%) - Rotating frame X/Y (20-70%) - Creating rotated GIF (70%) - Saving rotated GIF (80%) - Rotation complete (100%) Both resize and rotate tools now have proper GUI integration and progress feedback.
- Fix RotatePanel to inherit from ttk.Frame for proper pack() method - Add frame packing to RotatePanel setup_ui method - Add progress callback support to crop_gif function and GifCropper class - Add detailed progress updates for crop tool: loading, cropping frames, saving - Update main application to handle crop tool execution - Open crop panel dialog instead of 'coming soon' message Progress updates for crop tool: - Loading GIF (0%) - Cropping GIF to WxH (20%) - Cropping frame X/Y (20-70%) - Creating cropped GIF (70%) - Saving cropped GIF (80%) - Crop complete (100%) Both rotate and crop tools now have proper GUI integration and progress feedback.
- Fix CropPanel to inherit from ttk.Frame for proper pack() method - Add frame packing to CropPanel setup_ui method - Crop tool now displays properly in dialog window All three basic tools (resize, rotate, crop) now have proper GUI integration.
- Add tabbed interface with Visual Crop and Manual Crop tabs - Implement interactive crop area selection with mouse drag - Add GIF preview with automatic scaling and centering - Real-time coordinate conversion from canvas to image coordinates - Live update of crop area information and manual fields - Maintain aspect ratio option for crop selection - Visual feedback with red rectangle outline and stipple fill Features: - Load GIF and display first frame for visual cropping - Click and drag to select crop area - Real-time coordinate display (X, Y, W, H) - Automatic conversion between canvas and image coordinates - Synchronized manual crop fields - Professional image editing interface The crop tool now works like standard image editing software!
- Fix GIF loading error with proper exception handling in display_gif_preview - Add comprehensive aspect ratio presets: Free, 1:1 (Square), 4:3, 3:2, 16:9, 21:9, 2:1, 3:1 - Implement aspect ratio constraint during crop selection - Real-time aspect ratio enforcement while dragging - Professional aspect ratio selection with dropdown Features: - Error handling for GIF loading and display issues - Aspect ratio dropdown with common presets - Constrained crop selection based on selected aspect ratio - Visual feedback maintains aspect ratio during drag - Free selection option for unrestricted cropping The crop tool now has professional aspect ratio controls like image editing software!
- Add debug messages to track image loading process - Set minimum canvas size (400x300) to prevent sizing issues - Force canvas update before getting dimensions - Add padding to image scaling calculation - Add visual border around loaded image - Include detailed error logging with stack traces Debug features: - Console output for each step of image loading - Canvas size detection and fallback - Image scaling calculation details - PhotoImage creation verification - Canvas display confirmation This should resolve the image loading issues in the crop tool.
- Fix NameError: name 'Image' is not defined by adding proper PIL imports - Add auto-loading of GIF from main dashboard when opening crop tool - Increase crop dialog window size from 600x500 to 800x700 for better visibility - Add auto_load_gif method with delayed display for proper UI initialization - Pass current_file from main app to crop panel constructor Fixes: - Image loading now works properly with correct imports - GIF automatically loads when opening crop tool from main dashboard - Larger window shows all options and controls properly - Better user experience with immediate GIF preview The crop tool now works seamlessly with the main application!
- Fix ZeroDivisionError in aspect ratio constraint function - Add 15+ aspect ratio presets including horizontal and vertical options: * Free, Square (1:1), Classic (4:3), Camera (3:2) * Widescreen (16:9), Ultra-wide (21:9), Panoramic (2:1) * Portrait ratios: 5:4, 3:4, 2:3, 9:16 (Vertical Video) * Vertical ratios: 1:2, 1:3 (Ultra-vertical) - Update README.md with current progress and implemented features - Update project status markdown with Phase 3.1 completion - Document major achievements and technical improvements Documentation Updates: - Clear status indicators (✅ COMPLETED, 🔄 IN PROGRESS, ⏳ PENDING) - Current development phase tracking - Progress metrics updated to 75% overall - Next immediate tasks outlined - Major achievements section added Ready to continue development in future sessions!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.