Page 1 of 1
How-to: set Cropp-Ratio and DPI in one operation?
Posted: Fri Oct 28, 2022 9:58 am
by Gerald_Ire
Try to make XnViewMP function as easy as possible - for our "standard user"
work to do:
crop image to 1920 x 1080 with 72 dpi for online publishing...
issue:
set option in CropSize.xmp - but cant set the resolution there...
Code: Select all
...
<item label="1920x1080_Format" width="16" height="9" unit="ratio" ratio="0" visible="yes"/>
<item label="1200x600_Format" width="2" height="1" unit="ratio" ratio="0" visible="yes"/>
...
set option in ResizePreset.txt - but cant set the resolution there...
Code: Select all
...
175%
200%
1920x1080, MainImage
1200x600, TeaserImage
...
workaround:
1) crop image on that 16x9-ratio
2) resize image on 72dpi with 1920 x 1080 px - and make sure 72dpi is set

- 20221028_screenshot_002786.png (10.02 KiB) Viewed 961 times
Would love to do this in one step... any suggestion?
Any hints?
PS: Happy

Halloween - enjoy the weekend...
Re: How-to: set Cropp-Ratio and DPI in one operation?
Posted: Fri Oct 28, 2022 11:55 am
by Gerald_Ire
Info: Edit CropSize-xml:
<?xml version="1.0" encoding="UTF-8"?><crop_size version="1.0">
<array>
<item label="1920x1080_Format" width="16" height="9" unit="ratio" ratio="0" visible="yes"/>
<item label="1200x600_Format" width="2" height="1" unit="ratio" ratio="0" visible="yes"/>
</array>
</crop_size>
The "Doctype-Error" in XML is now gone when "label" gets text...
Re: How-to: set Cropp-Ratio and DPI in one operation?
Posted: Fri Oct 28, 2022 1:32 pm
by Gerald_Ire
Any chance to do this via batch / batch cmd-button?
Cropp has to be manual, but the conversion to 1920x1080-72dpi wont work...
Hotfolder doesnt work the way I think it should...
Cant get this run...

Re: How-to: set Cropp-Ratio and DPI in one operation?
Posted: Tue Nov 08, 2022 4:30 pm
by xnview
you can't use same in batch convert?
Re: How-to: set Cropp-Ratio and DPI in one operation?
Posted: Wed Nov 09, 2022 6:34 am
by Gerald_Ire
Hi Piere! Thx for reply.
I will try batch again and post my results....
Re: How-to: set Cropp-Ratio and DPI in one operation?
Posted: Thu Nov 24, 2022 4:05 pm
by Gerald_Ire
I skipped the batch process cause for the whole workflow I/we have to combine two functions with four variables:
1) Resize image: depending on two formats (1920x1080 / 1200x600) or "Longest side" (width or heigth = 4x options)
2) add Canvas Resize - depending on the formats (1920x1080 / 1200x600)
I think IF "Canvas Resize" would have as well the option "Longest side option" it might be done in one step.
What do you think?
Resize with option "Longest side"
Canvas Resize without option "Longest side"
--------------------------------------------------------------------------------------------------------------------------------------------
And: I found the two "preset voodoo lines" of my changes in xnview.ini (via comparison before & after changes)
[ResizeDlg]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x2\x83\0\0\0\x66\0\0\x3}\0\0\x2\xcb\0\0\x2\ (...)
presets=@Variant(\0\0\0\b\0\0\0\x5\0\0\0\x1c\0T\0\x65\0\x61\0s\0\x65\0r\0H\0\xf6\0h\0\x65\0_\0 (...)
loadDefaults=true
[CanvasDlg]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x2\x83\0\0\0\x66\0\0\x3}\0\0\x2\xcb\0\0\ (...)
presets=@Variant(\0\0\0\b\0\0\0\x3\0\0\0\x1a\0T\0\x65\0\x61\0s\0\x65\0r\0_\0z\0\x65\0n\0t\0\(...)
loadDefaults=true
I can now add this lines in the AppData setup for everyone

Thx for the hint!