imagemagick add command options?

82 views
Skip to first unread message

Stephen S

unread,
Dec 14, 2017, 2:15:36 AM12/14/17
to ResourceSpace
Is there some way (without editing image_processing.php) to add imagemagick command options? In particular, I noticed that the default resized images look somewhat blurry compared to the same quality outputs from photoshop. After some investigation, I realized that this was because photoshop sharpens resized images slightly. So I just want to add an "-unsharp 1.5x1+0.7+0.02" option to the convert command. Is there an easy way to do this in RS, or do I need to edit the file?

Jeff Nova

unread,
Dec 14, 2017, 2:40:42 AM12/14/17
to ResourceSpace
Hi Stephen,

Photoshop doesn't apply sharpening during a downsampling - it uses different resampling methods that may look sharper.   It's also possibly a function of JPEG compression for previewing in ResourceSpace, unless you also saved the resized files as JPEGs with the same quality setting and then compared?  There is no way to adjust this without editing the file.  I can look at this in a while and consider committing a change.  Applying an unsharp mask after resizing is definitely done sometimes, but I think it will likely yield best results if we review the interpolation method and dial in a Lanczos flavor that is more effective.  I would welcome your experimenting!  Nicolas Robidoux's article is great (I believe he is still with Phase One):  http://www.imagemagick.org/Usage/filter/nicolas/#downsample

Very best,
Jeff

On Wed, Dec 13, 2017 at 11:15 PM, Stephen S <ssu...@gmail.com> wrote:
Is there some way (without editing image_processing.php) to add imagemagick command options? In particular, I noticed that the default resized images look somewhat blurry compared to the same quality outputs from photoshop. After some investigation, I realized that this was because photoshop sharpens resized images slightly. So I just want to add an "-unsharp 1.5x1+0.7+0.02" option to the convert command. Is there an easy way to do this in RS, or do I need to edit the file?

--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.com
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespace+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen S

unread,
Dec 14, 2017, 2:59:30 AM12/14/17
to ResourceSpace
Hi Jeff,

Thanks for the reply, it is illuminating. As I have been thinking about this more, I get the feeling that the best course of action w/r/t RS would be to have a preference or config option that allows any option additions to the imagemagick convert command. I think this would be the best course of action because people have differing assets from a variety of inputs and in a variety of formats. What makes our images look best to our eyes (unsharp mask for example) may not look best in all use cases for all users of the system. Simply allowing command line options to be added would be a lot more flexible. That said, I do think the "out of the box" preview generation could be better than it is currently, I have been trying with a couple of filters (Lanczos, Lanczos2, Catrom), but so far have not been as impressed with the results vs applying unsharp mask. I will keep testing and report back anything useful I find.

Thanks,

Stephen

Stephen S

unread,
Dec 14, 2017, 5:44:35 AM12/14/17
to ResourceSpace
Hi again Jeff,

I was also checking the logs and notice some odd (well, seems odd anyway) behavior in the preview generation process:

It seems that the system generates a large (9999x9999) jpg file from our uploaded tiff files, and THEN uses that jpg to generate all other sizes.

I'm hoping you know something about this and can answer some questions:

Is this necessary? Is there a way to tell the system to always use the original file as basis when creating previews?

Thanks!

Jeff Nova

unread,
Dec 14, 2017, 6:13:57 AM12/14/17
to resour...@googlegroups.com
It doesn’t generate a source file at 9999x9999 - that is the maximum area it fits inside. It never upsamples. This architecture speeds up previewing immensely and works for most users.

I do not know of a way to change that without hiring a developer to do so. If these are things you wish to see developed, feel free to write me privately, and we can explore further.

Very best,
Jeff
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.com
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.

Allison Stec

unread,
Dec 14, 2017, 7:51:18 AM12/14/17
to resour...@googlegroups.com, Stephen S
Give $imagemagick_mpr=true a shot. This always use the original when making previews and also allows retention of your choice of embedded metadata tag groups with $imagemagick_mpr_preserve_metadata_profiles.

Allison Stec


--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.com
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.

Stephen S

unread,
Dec 14, 2017, 10:14:27 AM12/14/17
to ResourceSpace
thanks Allson, I will give it a shot.
Reply all
Reply to author
Forward
0 new messages