Hi
I'm looking to replace ImageMagick for some automated image processing, and hoping that nConvert could be a good replacement. The performance on large files is much better, but I have a couple of questions which are causing me problems.
Can nConvert read Photoshop PSB files? I've tried a couple of samples, doing a -info displays sensible information, but doing any kind of processing or output gives "Error: Can't read file".
Are there any options that can be passed into a resize/thumb command? It looks like thumb and ratio resize fit the image inside the width/height. However we often use a "cover" option by passing "^" into ImageMagick which means that the image would be as small as possible but at least as big as the width/height given. Is this possible with nConvert without getting the width/height and doing a manual calculation?
Are there other options that can be passed into resize such as don't enlarge if the image is smaller than the dimensions?
thanks
Darklyg.
Replacing ImageMagick with NConvert
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 45063
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Replacing ImageMagick with nConvert
Yes, please send me a sample to try?darklyg wrote: Can nConvert read Photoshop PSB files? I've tried a couple of samples, doing a -info displays sensible information, but doing any kind of processing or output gives "Error: Can't read file".
You can useAre there any options that can be passed into a resize/thumb command? It looks like thumb and ratio resize fit the image inside the width/height. However we often use a "cover" option by passing "^" into ImageMagick which means that the image would be as small as possible but at least as big as the width/height given. Is this possible with nConvert without getting the width/height and doing a manual calculation?
Code: Select all
-resize longest size
yesAre there other options that can be passed into resize such as don't enlarge if the image is smaller than the dimensions?
Code: Select all
-rflag decr
Pierre.
-
- Posts: 4
- Joined: Tue Sep 13, 2016 10:22 am
Re: Replacing ImageMagick with nConvert
I can't send you the large psb due to client confidentiality, but it was just over 900Mb in size. Do you have a large psb you can test? I've also noticed that a smaller psb doesn't work correctly, although it was created from a B&W jpeg so not sure if that causes a problem.xnview wrote: Yes, please send me a sample to try?
This is not quite what I need. I want to be able to specify both a width and height, but instead of the processed image fitting exactly inside the box, it covers the entire dimensions with any extra required. Does this make sense?xnview wrote: You can useCode: Select all
-resize longest size
Thanks for this.xnview wrote: yesCode: Select all
-rflag decr
-
- Author of XnView
- Posts: 45063
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Replacing ImageMagick with nConvert
the one that i have worksdarklyg wrote: I can't send you the large psb due to client confidentiality, but it was just over 900Mb in size. Do you have a large psb you can test? I've also noticed that a smaller psb doesn't work correctly, although it was created from a B&W jpeg so not sure if that causes a problem.
This is not quite what I need. I want to be able to specify both a width and height, but instead of the processed image fitting exactly inside the box, it covers the entire dimensions with any extra required. Does this make sense?
Code: Select all
-resize w h
Pierre.
-
- Posts: 4
- Joined: Tue Sep 13, 2016 10:22 am
Re: Replacing ImageMagick with nConvert
Ok, I am trying to get permission to share the original file which won't process at all, but I'm not confident. In the meantime I have uploaded a sample psb which won't process correctly. It doesn't give any errors, but the output file is just random colours.xnview wrote: the one that i have works
https://www.wetransfer.com/downloads/cc ... 920/eb2761
Sorry, thats not what I mean. Say I have a 400x200px image, and use nConvert with "-thumb 100 100" or "-ratio -resize 100 100" nConvert gives me 100x50px. But I would like an option to resize "cover" which would give me an output of 200x100px. So it keeps the same ratio, and is as small as possible to cover the supplied dimensions, but it doesn't matter if one dimension is larger to preserve the ratio. Does that make sense?xnview wrote:Code: Select all
-resize w h
-
- Author of XnView
- Posts: 45063
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Replacing ImageMagick with nConvert
ok i'll check. This file is loaded correctly by imagemagick?darklyg wrote:Ok, I am trying to get permission to share the original file which won't process at all, but I'm not confident. In the meantime I have uploaded a sample psb which won't process correctly. It doesn't give any errors, but the output file is just random colours.xnview wrote: the one that i have works
https://www.wetransfer.com/downloads/cc ... 920/eb2761
Sorry, thats not what I mean. Say I have a 400x200px image, and use nConvert with "-thumb 100 100" or "-ratio -resize 100 100" nConvert gives me 100x50px. But I would like an option to resize "cover" which would give me an output of 200x100px. So it keeps the same ratio, and is as small as possible to cover the supplied dimensions, but it doesn't matter if one dimension is larger to preserve the ratio. Does that make sense?[/quote]xnview wrote:Code: Select all
-resize w h
So you can use
Code: Select all
-resize 100 0
Pierre.
-
- Posts: 4
- Joined: Tue Sep 13, 2016 10:22 am
Re: Replacing ImageMagick with nConvert
Yes it saves into other formats without a problem.xnview wrote: ok i'll check. This file is loaded correctly by imagemagick?
This is fine with that image. But I want to define dimensions of 200x100, and it process a 800x400 image to 200x100, but also process a 400x800 image to 200x400 and a 400x400 image to 200x200. So whatever ratio image I upload, it produces an image at least 200x100 but preserving ratio. Take a look at the ^ resize operator on ImageMagick, which is described as "Minimum values of width and height given, aspect ratio preserved".So you can useCode: Select all
-resize 100 0
Thanks for your help so far, I realise that the "cover" option seems unusual at first, but its very useful in producing web thumbnails for fluid layouts.
-
- Author of XnView
- Posts: 45063
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Replacing ImageMagick with nConvert
Please send your email by PM, i would like to send you a test versiondarklyg wrote: This is fine with that image. But I want to define dimensions of 200x100, and it process a 800x400 image to 200x100, but also process a 400x800 image to 200x400 and a 400x400 image to 200x200. So whatever ratio image I upload, it produces an image at least 200x100 but preserving ratio. Take a look at the ^ resize operator on ImageMagick, which is described as "Minimum values of width and height given, aspect ratio preserved".
Pierre.