Please note, I've used XnView for several years, but not that much "time"; I also did search (and Google Search) for "blurred frame" before I posted. I also looked at the XnView For Beginners posts, but I did not see anything resembling and answer.
Ok, I am going to be processing about 100 photos in the next week or so, as I have done in the past - the photos are a variety of sizes, and I have a batch job that resizes the photos to a standardized 1280 x 720 for the projector I will be showing them on. The batch job also inserts text in the top left corner, and I might be adding some more bells and whistles...
One thing that someone asked about is putting a blurred frame around the photo. That is to say, if the original photo is 720x720, what I get now is a 1280x720 "image" with a colored "letterbox" on the left and right of 280 (each side). What was asked was could it be a blurred image .
Like this:
Original:
Blurred Frame:
I don't mind inventing the wheel, but I don't want to RE-invent the wheel.
Is there something I'm missing in the Batch / Actions that will do this?
Batch Convert - Option to add Blurred Frame
Moderators: helmut, XnTriq, xnview, Dreamer
Re: Batch Convert - Option to add Blurred Frame
I think with a one batch conversion of XnView MP it's not possible to achieve what you want because your image is used twice within one conversion and combined to a new image. Currently, this is not supported in XnView. and there is no such thing like a dedicated "Blurred Frame" action, yet.
What you can do is using three subsequent batch conversion. With this approach you can generate
1. background image (blur, ...)
2. foreground image (resize, ...)
3. Combine background and foreground image.
For combining two images the "Watermark" action can be used. You "watermark" the background image with the foreground image. Problem with watermark action is that it will always use the same image as watermark for all input files while in your case the watermark image must be a different image for each input file.
But what you can do is using nconvert instead of XnView MP. When using nconvert you have both the flexibility of batch scripts plus the conversion actions of XnView. With this combination it should be possible what you want to achieve. Using nconvert and batch scripting needs some knowledge in programming, though.
What you can do is using three subsequent batch conversion. With this approach you can generate
1. background image (blur, ...)
2. foreground image (resize, ...)
3. Combine background and foreground image.
For combining two images the "Watermark" action can be used. You "watermark" the background image with the foreground image. Problem with watermark action is that it will always use the same image as watermark for all input files while in your case the watermark image must be a different image for each input file.
But what you can do is using nconvert instead of XnView MP. When using nconvert you have both the flexibility of batch scripts plus the conversion actions of XnView. With this combination it should be possible what you want to achieve. Using nconvert and batch scripting needs some knowledge in programming, though.
Re: Batch Convert - Option to add Blurred Frame
O.k., I've fiddled around with XnView MP's actions and filters and nconvert. The batch script below converts an image into a new image that is pretty close to your desired image. The new image will be output into subfolder "result".
Notes:
- How to use NConvert
Code: Select all
@echo off
REM -- Create subfolder for results
mkdir result
REM -- for all JPG files in current folder call nconvert and perform following:
REM -- Action 1: Enlarge image to 1280 x 1119 pixels
REM -- Action 2: Crop image by resizing canvas to 1280 x 720, image at center
REM -- Action 3a, 3b, 3c, 3d: Blur image by using average info of a 13x13 pixel square. Please note that this is done 4 times to make the image really blur.
REM -- Action 4: Add original image as watermark (centered and with 100% opacity)
REM -- Write output file into subfolder "result" using original name
@echo on
for /f "delims=|" %%f in ('dir /b *.jpg') do "C:\Program Files\xnview\NConvert\nconvert" -o "result\%%f" -ratio -rtype quick -resize 1280 1119 -canvas 1280 720 center -average 13 -average 13 -average 13 -average 13 -wmopacity 100 -wmflag center -wmfile "%%f" "%%f"
- Adding an action "Blurred frame" to XnView MP might be a good idea.
- NConvert does support wildcards for processing multiple files but I found it easier with a loop in the batch script.
- I might be wrong but NConvert seems not to have a resize which allows for specifying one dimension (here: width 1280), only. As a consequence, the script works 100% for images with ratio 1.14. For images with other ratios your image will be distorted but this shouldn't be too bad because the background image is blurred anyway.
- Right, using nconvert is difficult if you're not familiar with programming and batch scripts.
- How to use NConvert
Re: Batch Convert - Option to add Blurred Frame
See issue for current status and some details.
Pierre.
Re: Batch Convert - Option to add Blurred Frame
This problem is supposed to be fixed in XnView MP 1.3.1. Please check and confirm the bug fix here.
Pierre.
Re: Batch Convert - Option to add Blurred Frame
+1user0 wrote: Fri Dec 09, 2022 8:54 pm I suggest to merge this functionality (Batch convert > Blurred frame) with Resize canvas dialog.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Win11 x64 24H2, Hard Disk Sentinel Pro, MS PowerToys, Process Lasso Pro and Wintoys
Win11 x64 24H2, Hard Disk Sentinel Pro, MS PowerToys, Process Lasso Pro and Wintoys
Re: Batch Convert - Option to add Blurred Frame
"Blurred frame" added to Batch Convert (XnViewMP 1.4.2)jacayz wrote: Thu Sep 08, 2022 1:00 am Please note, I've used XnView for several years, but not that much "time"; I also did search (and Google Search) for "blurred frame" before I posted. I also looked at the XnView For Beginners posts, but I did not see anything resembling and answer.
Ok, I am going to be processing about 100 photos in the next week or so, as I have done in the past - the photos are a variety of sizes, and I have a batch job that resizes the photos to a standardized 1280 x 720 for the projector I will be showing them on. The batch job also inserts text in the top left corner, and I might be adding some more bells and whistles...
One thing that someone asked about is putting a blurred frame around the photo. That is to say, if the original photo is 720x720, what I get now is a 1280x720 "image" with a colored "letterbox" on the left and right of 280 (each side). What was asked was could it be a blurred image .
Like this:
Original:
Lot 004 - 2Q.jpg
Blurred Frame:
image (7).jpg
I don't mind inventing the wheel, but I don't want to RE-invent the wheel.
Is there something I'm missing in the Batch / Actions that will do this?
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Win11 x64 24H2, Hard Disk Sentinel Pro, MS PowerToys, Process Lasso Pro and Wintoys
Win11 x64 24H2, Hard Disk Sentinel Pro, MS PowerToys, Process Lasso Pro and Wintoys