How do I remove a left side perforation but keep the size format?

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Post Reply
EigentlichWizard
Posts: 4
Joined: Mon May 13, 2019 11:48 am

How do I remove a left side perforation but keep the size format?

Post by EigentlichWizard »

XnConvert Version 1.80 - windows x64 (Mar 2 2019) - Libformat version 7.26 here.

I have ~500 images which needs to stay in their (A4) size/format while removing their perforation/12-20 holes on the left.

I tried to crop it but it seems I can't get the old format back in a second step. Maybe an alternative would be to fill a certain area on the left border with white if I would know how to do it.

What is the best practice here from you point of view? Thanks in advance.

Best,
EigentlichWizard
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How do I remove a left side perforation but keep the size format?

Post by cday »

EigentlichWizard wrote: Mon May 13, 2019 12:08 pm XnConvert Version 1.80 - windows x64 (Mar 2 2019) - Libformat version 7.26 here.

I have ~500 images which needs to stay in their (A4) size/format while removing their perforation/12-20 holes on the left.

I tried to crop it but it seems I can't get the old format back in a second step. Maybe an alternative would be to fill a certain area on the left border with white if I would know how to do it.

What is the best practice here from you point of view? Thanks in advance.

You now have the 500 docx files referred to in your recent LibreOffice forum post as image files? :wink:

At a quick look, I think you should try using 'Canvas resize' twice, first to crop off the left sides using an anchor on the right, then to restore the canvas size to A4, setting the 'Background color' to white and again using an anchor on the right. Explore the various setting options in the menu to figure out the settings required. You can set up the two operations in the same Actions settings window. Take a careful look at the settings options on the Output tab too, to save possible delays!

If you hit a problem doing that, you should also be able to use a crop as the first operation.
EigentlichWizard
Posts: 4
Joined: Mon May 13, 2019 11:48 am

Re: How do I remove a left side perforation but keep the size format?

Post by EigentlichWizard »

You now have the 500 docx files referred to in your recent LibreOffice forum post as image files? :wink:
Yes! :)
At a quick look, I think you should try using 'Canvas resize' twice, first to crop off the left sides using an anchor on the right, then to restore the canvas size to A4, setting the 'Background color' to white and again using an anchor on the right. Explore the various setting options in the menu to figure out the settings required. You can set up the two operations in the same Actions settings window. Take a careful look at the settings options on the Output tab too, to save possible delays!
If you hit a problem doing that, you should also be able to use a crop as the first operation.
I tried with Canvas but it doesn't seem to work fmpov. I can also crop but I can't obtain the original size. Btw setting an image to A4 isn't that simple fmpov because it depends on the dpi/pixels. There is no A4 in the settings as well. I am ... somehow over-strained. :-/

Would you may help me? I could upload three images to be used with XnConvert...
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How do I remove a left side perforation but keep the size format?

Post by cday »

EigentlichWizard wrote: Mon May 13, 2019 7:25 pm I tried with Canvas but it doesn't seem to work fmpov.

FMPOV - Acronym Definition - 'From My Point Of View' - That's a new one for me... :D

I can also crop but I can't obtain the original size. Btw setting an image to A4 isn't that simple because it depends on the dpi/pixels. There is no A4 in the settings as well. I am ... somehow over-strained. :-/

Would you may help me? I could upload three images to be used with XnConvert...

I think you can get the result you need using two canvas resizes, although I can't be sure without trying it myself, you can set the new canvas size to A4 in mm [210mmx297mm].

BAM [By All Means, possibly first recorded use?] upload an example image or images, if you need further help...

Edit:

There is another possible way to get the result you need, in line with your original LibreOffice post I think, by pasting an area of white canvas over the area on the left with the perforations: that can actually be done using the 'watermark' action if you create a suitable [non-transparent] image file to use, but it's probably best to keep that method in reserve. You could probably easily create the 'watermark' file by cropping an area of the right margin of a page; a possible advantage would be that the color should be an accurate match, if that is an issue setting the 'Background color' when resizing the canvas.
EigentlichWizard
Posts: 4
Joined: Mon May 13, 2019 11:48 am

Re: How do I remove a left side perforation but keep the size format?

Post by EigentlichWizard »

I uploaded some of my images for batch-test purposes:

https://i.imgur.com/31fcyJQ.png
https://i.imgur.com/Wfe8NIR.png
https://i.imgur.com/ybGzmPb.png

I am thankful for any help.

Best
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How do I remove a left side perforation but keep the size format?

Post by cday »

Thank you, I've had a very quick look and think there may be a bug in at least one of the 'Canvas resize' options, however I have easily obtained a probably-not-quite-optimal result for your first file, attached...

Hint: I used Width 95% Height 100%, Position Right for the first action, and Width 105% Height 100%, Position Right for the second action.

Should be other probably more 'elegant' solutions, though.

It's a sunny afternoon here, so I'll have a more detailed look later!


31fcyJQ_result.png
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How do I remove a left side perforation but keep the size format?

Post by cday »

I can now give you three ways of getting the result you need, there may be others including using a crop as the first action, although I see no advantage in that:

1. Use the Canvas resize option twice as above, except that to restore the canvas width exactly after the first 5% resize, the second resize should be 105.26% rather than 105%, small difference I know.

2. Use the Canvas resize option twice, using the Relative option, first removing a small part on the left side where the perforations are, then restoring the original canvas width using the relative option to increase the canvas width by the same amount as was removed. Relative settings with the Keep ratio option unchecked could be Width -1.0 cm Height 0 for the first resize, and Width (+)1.0 cm Height 0 cm for the second resize.

The above method could be considered more 'elegant' in that the original canvas width will always be restored exactly, in practice more perfectionism, though!

Note that the Relative 'mm' size option seems to have a bug, which I have just reported.

3. Use the 'watermark' option, using as the 'watermark' an image created from a narrow full-height crop of the right side of the page. An advantage when the page background isn't pure white is that the actual background colour can be more easily matched.

I am unable, at least on my laptop, to obtain screenshots that show the full height of two actions, but ask if you require any further guidance. :D
EigentlichWizard
Posts: 4
Joined: Mon May 13, 2019 11:48 am

Re: How do I remove a left side perforation but keep the size format?

Post by EigentlichWizard »

Please accept my apology for my delay answering you. I was on vacation with my wife. I will immediately check your solutions and will come back to you. Thank you very much for your precious life time providing these answers in advance.
Post Reply