Open Photography Forums  
HOME FORUMS NEWS FAQ SEARCH

Go Back   Open Photography Forums > Digital Darkroom > Image Processing and Workflow

Image Processing and Workflow RAW, DNG , TIFF and JPG. From Capture to Ready for Publish/Display. All software and techniques used within an image workflow, (except extensive retouching and repair or DAM).

Reply
 
Thread Tools Display Modes
  #1  
Old July 19th, 2014, 02:27 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default A free high quality resampling tool for ImageMagick users

Hi folks,

This post is a notification of the availability of a free tool for high quality image resampling (resizing). It is a works-in-progress project (hence the D.I.Y. title prefix), since the science behind it is also evolving, and there are a few inconveniences that yet need to be resolved.

The tool is a small Windows batch file, it can be downloaded here (link is updated to version 1.2.2). It depends on the availability of an already installed version of ImageMagick, an image processing toolkit that is usually operated from the command-line console. ImageMagick is also available for several other platforms, e.g. Mac OS and Unix/Linux, but the linked tool is specifically designed for Windows. However, it should be rather easy to translate it to another script dialect for other operating system script engines.

The Windows batch script file allows to drag an image onto the (icon of) the batch file in the file explorer or on the desktop. It can also be added to the Windows SendTo folder (e.g. 'C:\Users\YOURNAME\AppData\Roaming\Microsoft\Windo ws\SendTo' for Windows 7), which will then allow to right mouse-click on any image on your system and send it to the batchfile for processing.

The usage instructions are simple, just enter the required percentage (e.g. 50% will produce a copy at half the size of the original), or the maximum dimensions for an image (e.g. 800x800 will fit the longest dimension of your original image to 800 pixels, the smaller dimension will automatically scale proportionally, aspect ratio is maintained).

So what's so novel about it?

Well, image quality is usually negatively impacted by resizing (resampling) images. In addition to loss of sharpness, there are all sorts of artifacts that can be created, depending on image content and method of resizing. Aliasing artifacts of small repetitive features are very common on down-sampled images, e.g. for web publishing. Upsampling of images for larger print sizes may develop nasty halos around sharp edge transitions, and they will be easy to see because of the larger output size.

This is why there is ongoing research, as to which algorithms produce the best results. As a result of various on-line discussions (e.g. here, and here), a recent suggestion by a Canadian researcher (Nicolas Robidoux) has shown huge potential as a general approach that delivers high quality, low artifact, resized images. He asked me to try encoding his conceptual approach to facilitate further research into its optimization, which I did, and he has kindly allowed me to share the findings/scripted set of instructions that resulted.

Since the resized image quality is already so good, I decided to make a small batch script file for my own use, and share it with you for enjoyment.

There is still an issue that needs to be resolved though, and that has to do with the resulting file not having a color profile attached to it. So one is (untill I can find a simple solution) required to do that in a color-managed application that allows to assign the same profile as the original image had. Since many here use Photoshop, or similar applications that should only be an inconvenience, hopefully solved soon.
UPDATE, the colorprofile issue was fixed.

To be continued, image samples will follow.

Cheers,
Bart

P.S. The download link has be updated to point to the latest version (1.2.2)
__________________
If you do what you did, you'll get what you got.

Last edited by Bart_van_der_Wolf; April 13th, 2015 at 01:26 AM.
Reply With Quote
  #2  
Old July 19th, 2014, 05:19 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default

*** UPDATE ***

I've found a solution for the embedding of the color profile, it seems ...

Here is an updated version (latest version is 1.2.2). The tool now copies the original profile that is embedded in the original image, and embeds that in the resized version. It also retains the original file type, so a JPEG remains a JPEG, and a TIF remains a TIF, it just has a different size, as indicated by the new file name, but now with the same profile as the original source.

The script (or rather ImageMagick) will produce warning messages if no profiles are embedded, but the conversion is still performed as intended, just without profile.

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

Last edited by Bart_van_der_Wolf; April 13th, 2015 at 01:29 AM.
Reply With Quote
  #3  
Old July 20th, 2014, 09:53 AM
Nicolas Claris Nicolas Claris is offline
Administrator/Moderator
 
Join Date: Apr 2006
Location: Bordeaux
Posts: 5,439
Default

Hi Bart
I'd love to give it a try… I'm sure Windows users will get a huge benefit of this script.
Congrats : D
__________________
WEBSITE - FACEBOOK - INSTAGRAM
Please do no repost my images elsewhere than OPF without my permission.
Reply With Quote
  #4  
Old July 21st, 2014, 11:44 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default

Quote:
Originally Posted by Nicolas Claris View Post
Hi Bart
I'd love to give it a try… I'm sure Windows users will get a huge benefit of this script.
Congrats : D
Hi Nicolas,

It shouldn't take too many adjustments to translate the script to a Unix dialect that could run on Mac OS, provided one is bold enough to install ImageMagick as engine for the number crunching. Didn't you also have a Windows computer in the office, for Web development?

Anyway, I've updated the script (Version 1.2.2) with the latest insights that emerged form discussions elsewhere. That changes the behavior a little bit when viewed side by side it might be noticeable, but more importantly it reduces he risk of aliasing on very critical surfaces.

I also added the option to downsample with an even better method/quality, and do that with/without sharpening, e.g. for Web publishing. The embedded color profile of the original file is assigned to the result, so make sure that the profile is already what you ultimately want.

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

Last edited by Bart_van_der_Wolf; April 13th, 2015 at 01:30 AM.
Reply With Quote
  #5  
Old July 21st, 2014, 01:21 PM
Nicolas Claris Nicolas Claris is offline
Administrator/Moderator
 
Join Date: Apr 2006
Location: Bordeaux
Posts: 5,439
Default

Hi Bart
thanks for the reply.
Yes we do have a Windows computer running, but there's a man (Sébastien) working with it al the days round!
I do have imageMagick installed on my latest Mac:

But have no clue on how to "translate" the script… :-(

It's good news that it can be used also for downsampling as I use more this than upsizing.
With the files from the 645D, I do have plenty room… : D

BTW Nowadays and without your script, the fastest and good way for down and up sizing can be done with Lightroom 5.5…
I get much better results than with Photoshop.
__________________
WEBSITE - FACEBOOK - INSTAGRAM
Please do no repost my images elsewhere than OPF without my permission.
Reply With Quote
  #6  
Old July 27th, 2014, 06:50 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default

Hi folks,

The Windows Batch Script file has been updated to Version 1.2.2, with the main changes being: better down-sampling quality, more finely tunable and improved sharpening quality.

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

Last edited by Bart_van_der_Wolf; April 13th, 2015 at 01:33 AM.
Reply With Quote
  #7  
Old July 27th, 2014, 10:14 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default

Here are a couple of examples that show the downsampling quality as can be achieved with the current version (V1.1.3) (Note: the script has been updated to V1.2.2 which can create a further improved quality):

The larger originals (longer download times due to size!) are here, and here.




I've used a pretty strong sharpening amount of 150 (user adjustable), also to demonstrate that it doesn't totally ruin the image detail, it just adds more contrast to micro-detail, while trying to avoid visible halos.

Make sure to watch at the intended zoom factor of 100%, some browsers (automatically) enlarge the size based on the larger font setting of the desktop, even at a browser setting of 100%.

People who are used to shooting ship's rigging, like Nicolas, know how hard it is to avoid the jagged stair-stepped look of fine lines against a bright sky. This tool does it pretty well, IMHO.

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

Last edited by Bart_van_der_Wolf; April 12th, 2015 at 05:26 AM.
Reply With Quote
  #8  
Old July 27th, 2014, 11:08 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,195
Default

Hi, Bart,

Quote:
Originally Posted by Bart_van_der_Wolf View Post

Make sure to watch at the intended zoom factor of 100%, some browsers (automatically) enlarge the size based on the larger font setting of the desktop, even at a browser setting of 100%.
Indeed, Firefox does so, something I discovered when recently working with certain monitor test images.

I note the following on my Windows 7 system, using Firefox V31:

I have the "display resolution" set to 120 px/in ("125% of the default").

If I have the Firefox zoom set to two steps of "zoom out" from "reset", and "Only zoom text" unchecked, then I get pixel-for-pixel rendering. (So on my system, that browser zoom setting must be 80.0% zoom.)

I cannot at all be certain that this holds in every situation. I will do some more research on that.

There are settings in about:config that influence the "normal" zoom ratio. I need to learn more about them.

Best regards,

Doug
Reply With Quote
  #9  
Old July 27th, 2014, 11:28 AM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,046
Default

Quote:
Originally Posted by Doug Kerr View Post
Hi, Bart,



Indeed, Firefox does so, something I discovered when recently working with certain monitor test images.

I don't know yet how to avert this in a practical way.
Hi Doug,

My Win7 machine uses a 125% setting for the display of desktop icons and such (due to it's higher resolution display), and that triggers my Firefox browser to 125% image size viewing at a 100% zoom setting. If I want to see the true size, I need to zoom in Firefox to 80%, but that of course also reduces the size of text (<CTRL>- and <CTRL>+ also zoom out and in).

It's not as it should be, displaying a larger font size should leave the images alone.

Cheers,
Bart
__________________
If you do what you did, you'll get what you got.
Reply With Quote
  #10  
Old July 27th, 2014, 11:36 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,195
Default

Hi, Bart,

Quote:
Originally Posted by Bart_van_der_Wolf View Post
Hi Doug,

My Win7 machine uses a 125% setting for the display of desktop icons and such (due to it's higher resolution display), and that triggers my Firefox browser to 125% image size viewing at a 100% zoom setting. If I want to see the true size, I need to zoom in Firefox to 80%, but that of course also reduces the size of text (<CTRL>- and <CTRL>+ also zoom out and in).

It's not as it should be, displaying a larger font size should leave the images alone.
Indeed.
"Is that right?"

"Maybe not, but it's so."
How can one set the zoomage in Firefox to a certain value numerically (that is, other then with Zoom out/Zoom in (<Ctrl>-/<Ctrl>+)?

Best regards,

Doug
Reply With Quote
  #11  
Old April 13th, 2015, 01:30 AM
Asher Kelman Asher Kelman is online now
OPF Owner/Editor-in-Chief
 
Join Date: Apr 2006
Posts: 32,738
Default

Bump!

This is worth re-reading!

Has anyone migrated this to a Mac environment?

Asher
__________________
Follow us on Twitter at @opfweb

Our purpose is getting to an impressive photograph. So we encourage browsing and then feedback. Consider a link to your galleries annotated, C&C welcomed. Images posted within OPF are assumed to be for Comment & Critique, unless otherwise designated.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Helpful Hints/D.I.Y.: A new tool for the production of high quality output Bart_van_der_Wolf Imaging Technology: Theory, Alternatives, Practice and Advances. 30 August 28th, 2013 09:10 AM
Pricing Fine Art Photography for Gallery etc. Vincent Valle Sales, Exhibitions and Web Presence 51 July 10th, 2011 02:18 AM
Question: Your favorite MF or 35 mm format lenses that are free of CA and have high resolution? Asher Kelman Imaging Technology: Theory, Alternatives, Practice and Advances. 7 August 3rd, 2010 08:46 PM
PhotoDenoising a low cost but high quality denoiser Giovanni Brembati Software and Equipment News:MFRS brief announcemts: free but moderated. 0 September 25th, 2007 02:49 PM
Trade-offs between high speed and image quality versus high resolution John Sheehy Imaging Technology: Theory, Alternatives, Practice and Advances. 51 April 22nd, 2007 09:38 PM


All times are GMT -7. The time now is 01:27 PM.


Posting images or text grants license to OPF, yet © of such remain with its creator. Still, all assembled discussion © 2006-2017 Asher Kelman (all rights reserved) Posts with new theme or unusual image might be moved/copied to a new thread!