Pages: [1]   Go Down

Author Topic: Best quality downsampling tool  (Read 3575 times)

samueljohnchia

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 498
Best quality downsampling tool
« on: January 15, 2017, 09:24:09 am »

Hi all, just wondering what is the current state-of-the-art for downsampling images?

I'm preparing my photographs for book printing, and a great majority of them would require downsampling to the printer's native input resolution, and I'm not satisfied with using Photoshop's Bicubic. I used to use Bart's free high quality resampling script using ImageMagicK, but I can't seem to get it to run of late. I also see on that thread, there were several discussion points about how the resampling could be even better. Evidently several members have modified the script to something even more powerful.

One of the shortcomings of the V1.22 script was that it needed the original image to be in the sRGB color space. What is needed is a tool that accepts input files of any RGB color space and gamma.

I'm also wondering if there are any plug-ins or standalone specialist software that uses what is considered the best quality interpolation for downsampling, like how we have Photozoom Pro for upsampling. I've not no experience with scripting and working with ImageMagick and would prefer to avoid having to do that, if possible. Thanks!
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Best quality downsampling tool
« Reply #1 on: January 16, 2017, 09:53:50 am »

I used to use Bart's free high quality resampling script using ImageMagicK, but I can't seem to get it to run of late.

Hi Samuel,

Depending on the version of ImageMagick, it should still work as it did. However, for ImageMagick Version 7, current Windows version is "ImageMagick-7.0.4-4-Q16-x64-dll.exe", the "convert" command needs to be replaced by the "magick" command in the batch script file's text, by using a simple text editor (like Window's "Notepad"). The documentation on the ImageMagick website is not very clear about that change, to put it mildly (their examples still refer to "convert" instead of "magick").

I have yet to try the HDRI version (which supports floating point numbers), and which probably needs more changes in the script.

Quote
One of the shortcomings of the V1.22 script was that it needed the original image to be in the sRGB color space. What is needed is a tool that accepts input files of any RGB color space and gamma.

That's not quite the case. The script saves the input colorspace that is embedded in the source file. It then does several conversions from and to different gamma spaces and back to the original gamma space (a slope limited sRGB gamma is assumed for input and output, which could be perfected a bit for ProPhoto RGB but it should work quite well anyway, but I'd have to study the current IM methods for gamma changes), and it then re-assigns the original colorspace.

I have to test how IM7 handles that, maybe something has changed there as well.

Now that Capture One Pro, which is my go-to Raw converter, has implemented a lot of this resampling functionality since version 9, I've not looked that much at ImageMagick. Now with the recent improvements for sharpness Proofing, there is even less need, although adding deconvolution sharpening after resampling (not only for Raw Capture sharpening) would be a bonus I'd appreciate a lot.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Pictus

  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
    • Retouching
Re: Best quality downsampling tool
« Reply #2 on: January 16, 2017, 11:39:52 am »

The latest ImageMagick versions 6 and 7 are in http://ftp.icm.edu.pl/packages/ImageMagick/binaries/
I am using http://ftp.icm.edu.pl/packages/ImageMagick/binaries/ImageMagick-6.9.7-4-Q16-HDRI-x64-dll.exe
and works just fine with the EXCELLENT(Thank you Bart!) V1.22 script without any modification.
The script is not 100% compatible with ImageMagick v7.
Logged

samueljohnchia

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 498
Re: Best quality downsampling tool
« Reply #3 on: January 16, 2017, 07:00:29 pm »

Super! Thanks Pictus! That V6.9.7 .exe file did the trick. My V1.22 script now runs perfectly. For some reason I was on ImageMagick V6.9 but the script refused to work. I installed V7 and of course it refused to work also. It would run, I would input all the things it asked for, but then it would not produce the resampled file.

Thanks also Bart, for confirming that it will work if the correct version of ImageMagick is installed.

That's not quite the case. The script saves the input colorspace that is embedded in the source file. It then does several conversions from and to different gamma spaces and back to the original gamma space (a slope limited sRGB gamma is assumed for input and output, which could be perfected a bit for ProPhoto RGB but it should work quite well anyway, but I'd have to study the current IM methods for gamma changes), and it then re-assigns the original colorspace.

I have to test how IM7 handles that, maybe something has changed there as well.

Oh, that's good to know. I wonder how well it deals with color spaces like Joseph Holmes's Dcam spaces that do not use simple gamma TRCs, but rather his custom "perceptually uniform" 1024 point curve. Some testing is in order.

Quote
Now that Capture One Pro, which is my go-to Raw converter, has implemented a lot of this resampling functionality since version 9, I've not looked that much at ImageMagick. Now with the recent improvements for sharpness Proofing, there is even less need, although adding deconvolution sharpening after resampling (not only for Raw Capture sharpening) would be a bonus I'd appreciate a lot.

So would you say that the resampling with Capture One V9 is the same, better or slightly worse than what is possible with ImageMagick?
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Best quality downsampling tool
« Reply #4 on: January 17, 2017, 07:50:34 am »

The latest ImageMagick versions 6 and 7 are in http://ftp.icm.edu.pl/packages/ImageMagick/binaries/
I am using http://ftp.icm.edu.pl/packages/ImageMagick/binaries/ImageMagick-6.9.7-4-Q16-HDRI-x64-dll.exe
and works just fine with the EXCELLENT(Thank you Bart!) V1.22 script without any modification.

Hi,

You're welcome. I cannot get V1.22 to work with the "ImageMagick-6.9.7-4-Q16-HDRI-x64-dll.exe", I had to use the non-HDRI version instead. Maybe it's related to Windows 10, don't know. I've read that the folks at ImageMagic development are going to maintain version 6 for 10-years after the release of version 7 a year ago, which is good news. However, I'd rather make the script work in ImageMagick v7, since that's where new IM functionality will be made available.

Quote
The script is not 100% compatible with ImageMagick v7.

Not in its original form, but I've been searching for version incompatibilities and I've found a couple (replacing 'convert' by 'magick', and an additional deliberate colorspace change from gray, which is now single channel, to sRGB which is 3-channels for the composite masking) that I've already fixed because they affect the results. I'm not done yet, but I've identified where the issues arise. It is running, but all that's needed is to find a solution that generates 100% identical output. Only then can I start thinking about perhaps improving things further with the new Version 7 functionality, if time allows.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

alain

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 465
Re: Best quality downsampling tool
« Reply #5 on: August 31, 2022, 03:20:57 pm »

Hi,

You're welcome. I cannot get V1.22 to work with the "ImageMagick-6.9.7-4-Q16-HDRI-x64-dll.exe", I had to use the non-HDRI version instead. Maybe it's related to Windows 10, don't know. I've read that the folks at ImageMagic development are going to maintain version 6 for 10-years after the release of version 7 a year ago, which is good news. However, I'd rather make the script work in ImageMagick v7, since that's where new IM functionality will be made available.

Not in its original form, but I've been searching for version incompatibilities and I've found a couple (replacing 'convert' by 'magick', and an additional deliberate colorspace change from gray, which is now single channel, to sRGB which is 3-channels for the composite masking) that I've already fixed because they affect the results. I'm not done yet, but I've identified where the issues arise. It is running, but all that's needed is to find a solution that generates 100% identical output. Only then can I start thinking about perhaps improving things further with the new Version 7 functionality, if time allows.

Cheers,
Bart

Hi Bart

Have you made a version for version 7?
I'm planning some test with the avif format and those need version 7.

Alain
Logged
Pages: [1]   Go Up