Page 1 of 1
Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T20:21:06-07:00
by Cidona
Dear ImageMagick Consultants.
I am not familiar with ImageMagick or programming.
What I’m ultimately looking for is:
I’m going to have a folder in each of my Projects called “Opacity PNGs”. I want it so that when PNG files are put into that folder that they will automatically be applied with opacity.
We might need to do a little bit of trial and error to know the percentage of opacity as I am not familiar with ImageMagick’s settings. I can provide samples of what I’m looking to achieve if interested in project.
Is this something that can be accomplished via ImageMagick and it’s programming capibilities? If so I would very much appreciate if you could provide pricing and time frame.
I am on Windows 10 64bit.
Any questions, concerns, etc?
Thank you.
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T20:24:47-07:00
by snibgo
Cidona wrote:... they will automatically be applied with opacity.
What does that mean?
PS. Please tell us what version of IM you use, on what platform.
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T21:00:47-07:00
by Cidona
Hi snibgo.
Thank you for your prompt response.
I do not currently use IM. I came across it while trying to find something to accomplish what I'm trying to achieve. It seemed with the ability to program IM, I thought it might be a good solution. Not sure what you mean by what platform I'm on. I am on Windows 10 64 bit, and would be open to additional tools to accomplish the desired result.
As far what I mean by "they will automatically be applied with opacity" - I'm using the term 'opacity' as that is a term in Snagit Editor that achieves the desired visual result (but very manual method). Please see below links to sample. The first link would be the starting point and second would be the desired end result. These are jpgs but real file will be PNG. It's that 'faded' look I'm trying to have automatically applied.
https://i.imgur.com/I930yI9.jpg
https://i.imgur.com/9ak4p1g.jpg
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T21:19:37-07:00
by snibgo
So you simply want to make each pixel a certain opacity?
Code: Select all
magick in.png -alpha opaque -channel A -evaluate Multiply 0.6 +channel out.png
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T21:25:27-07:00
by Cidona
Hi snibgo.
Yes, I'm looking for uniform application of opacity to the entire image.
Thank you for that code. Unfortunately I don't know what to do with it or how to assign it to specific folders. Would this be something that you would be able to work on with me to get it up and running? Price/by hour?
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T21:29:07-07:00
by fmw42
If you want to process a whole folder of images, then use mogrify rather than convert. See
https://www.imagemagick.org/Usage/basics/#mogrify
create a new output folder
change directory to input folder
Code: Select all
mogrify -path path2/output_folder -format png -alpha opaque -channel A -evaluate Multiply 0.6 +channel *.png
If you leave off the -path path2/output_folder, then the output will overwrite your input. But that is dangerous if you make a mistake. So make a backup of your input folder.
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at
http://www.imagemagick.org/discourse-se ... f=1&t=9620
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T22:07:59-07:00
by Cidona
Thank you fmw42 for the free code.
Truth be told though, I haven't got a clue what to do with it and am too busy currently (fire protection designer), to properly learn it on the fly.
I guess what I'm looking for is someone to walk me through the entire process. Installation, the code, testing and communicating via phone and screen sharing. I'm looking for something that is going to be very efficient, quick, error resistant, etc. so would be best handled by a professional rather than my first run at coding.
Please let me know if someone is interested in getting this up and running for me.
Thank you again.
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-19T22:30:34-07:00
by fmw42
You need to tell us on what platform you are trying to do this. Installation and command syntax are different. See
https://www.imagemagick.org/script/download.php
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-20T03:19:52-07:00
by will.anderson324
Hi Cidona,
I think I can put a double-click-able application together for you to do what you want. Drop me a direct message with a couple of example before and after PNGs and we'll have a chat about exactly what you're looking for.
Cheers,
Will
Re: Automatically apply opacity when PNG files are in folder.
Posted: 2018-04-20T09:29:53-07:00
by Cidona
Thank you willmanderson324. I'll PM you.
Best Regards.