Page 1 of 1

canvas resize / white border / fixed aspect ratio

Posted: Wed Oct 03, 2012 3:44 am
by blah789
is it possible to do a canvas resize with a fixed aspect ratio, but non-constant dimensions (just to add white borders)?

the source of my material is scans (about 1100 of them), so they don't have constant dimensions as in a digital camera (actually they vary quite wildly). I just need to add white borders so as keep a constant aspect ratio (3:2, for 4x6 prints), otherwise costco automatically crops them - even when you request prints with borders. (I thought the point of printing with borders was to avoid cropping! go figure...)

xnview allows you to set constant dimensions only, or if percentage, percentage of the same side (I would need percentage of the opposite side, for instance new_width = 100% of old_width, and new_length = 150% of old_width (so that new_length/new_width=3:2), but I don't know how to type it in)

Re: canvas resize / white border / fixed aspect ratio

Posted: Wed Oct 03, 2012 9:40 am
by xnview
Use 'values as delta'

Re: canvas resize / white border / fixed aspect ratio

Posted: Wed Oct 03, 2012 3:52 pm
by blah789
I'm trying that, but I still keep getting incorrect aspect ratios.
I put 150% for width and 100% for height, but the aspect ratio of the resulting pic is still off (should be exactly 1.5 in viewer mode at the bottom left, but depending on the material, I get 1.3 2.1 1.94 etc; that's after the border's been added)
perhaps I'm not putting the right numbers in the right boxes? should I put some expression instead? 1.5 x width (but correctly formatted?)

Re: canvas resize / white border / fixed aspect ratio

Posted: Thu Oct 04, 2012 1:00 pm
by xnview
Could you post some examples of what you want?

Re: canvas resize / white border / fixed aspect ratio

Posted: Fri Oct 05, 2012 2:52 am
by blah789
I uploaded my files here
http://www.sendspace.com/file/o0f4oz
sort them by name in xnview. the ones that are suffixed _resized have the operation I want done manually.

here's an example. view 03-17-06.jpg
the dimensions are 3272 (width) x 3263 (height)
do a test with calc (microsoft calculator in accessories)
3263 (height) x 1.5 = 4894.5 (potential new width)
we check that 4894.5 > 3272
(potential new width > old width)
so then I click image, canvas size
uncheck keep ratio
width = 4895
height = 3263 (unchanged)
background color = white

I have two white borders on the side, but the image is unchanged in size or anything else

another example: 03-09-01.jpg (really wide)
the dimensions are 7965x3168 (width x height)
we do a quick check heightx1.5
3168x1.5 = 4752 (potential new width)
unfortunately, 4752 < the old width (7965)
we reject it because otherwise we'd have to chop parts of the image off (which is what photo booths at walmart and costco do!)
so we do it the other way
7965/1.5 = 5310 (potential new height)
then we do a canvas resize, 7965x5310, white background.

this time white borders are added on top and on the bottom

I have over 1100 pictures to perform this operation on, and it'd be a pain to do it manually. it'd be easy if it were digital camera pictures, because the dimensions are the same and you can enter them manually. but these are scans, and the dimensions differ wildly.

I could use a script too (if I knew how to write one). I'd like to save in jpeg with 84% quality (if that's necessary to write the script)

I apologize if this is a hassle. let me tell you I am not in a hurry at all, so if you are busy with work, family life, or whatever, I can wait.

Re: canvas resize / white border / fixed aspect ratio

Posted: Mon Oct 08, 2012 8:04 am
by xnview
ok, i understand now but sorry it's not possible in XnView nor XnConvert :(