feat(image): implement sharp-based image operations backend

Add src/main/ImageOperations.js (convert/resize/compress/rotate via
sharp), modeled on PDFOperations.js's executeOperation dispatcher.
Wire ipcMain.handle('process-image-operation', ...) in main.js using
sanitizeErrorMessage() on error paths, and replace the 5 stale/unused
image-* channel names in preload.js's ALLOWED_SEND_CHANNELS with
process-image-operation + select-image-folder (mirroring
select-pdf-folder for a later batch-UI task).

Amit Haridas
This commit is contained in:
2026-08-23 19:31:33 +05:30
parent 949053a7c5
commit 8bada008b3
4 changed files with 245 additions and 5 deletions
+3 -5
View File
@@ -45,11 +45,8 @@ const ALLOWED_SEND_CHANNELS = [
'universal-convert-batch',
// Image converter
'image-convert',
'image-batch-convert',
'image-resize',
'image-compress',
'image-rotate',
'process-image-operation',
'select-image-folder',
// Audio converter
'audio-convert',
@@ -205,6 +202,7 @@ const ALLOWED_RECEIVE_CHANNELS = [
// Folder selection
'folder-selected',
'pdf-folder-selected',
'image-folder-selected',
// Header/Footer
'header-footer-settings-data',