Author |
Topic |
|
AndyColmes
USA
351 Posts |
Posted - May 08 2015 : 00:57:11
|
I would like to be able to save and replay any number of Actions as Macros like something in Photoshop where you can record any changes and replay them. So, actions like Cropping, image effects, resizing, etc. can be saved as an Action file and then used for other images. How would I implement something like that?
Thanks all in advance.
Andy
|
|
Uwe
284 Posts |
|
rmklever
Norway
51 Posts |
Posted - May 08 2015 : 14:08:33
|
Hi Andy,
I have done that and can tell you about one way of doing this.
What I did was that I made a custom FXDialog where I used a string with settings for each fx something like this:
fxGroupSet: array[0..9] of String = ( 'Adjust(Auto)', 'Artistic', 'Blur', 'Color', 'Distort', 'Edges', 'Geometry', 'Noise', 'Sharpen', 'Stylize');
fxCtrlSet: array[0..93] of String = ( '0;259;Gain offset;L:There is no parameters', '0;260;Histogram equalization;L:There is no parameters', '0;261;White balance: Auto white;L:There is no parameters', '0;262;White balance: Gray world;L:There is no parameters', '1;74;Comic;E:Ink Outline:0:99:50:50;E:Opacity:0:100:90:90;E:Halftone:0:95:6:6', '1;46;Flash fill in;E:Strength:0:100:10:10', '1;11;Glow;E:Strength:0:10:3:3;E:Brightness:-100:100:0:0;E:Contrast:-100:100:0:0', '1;65;Ink Sketch;E:Ink Outline:0:99:50:50;E:Coloring:0:100:50:50', ...
Here you can read the following... Group ID, FX id, FX name, Controls to use and values...
I hope you get the idea...
I keep one list as default settings and a copy for user settings witch is saved to disk...
When user click apply I add the string with current settings to a string list. If user click done this list is kept and you can add more actions to it like a tone curve or cropping actions... when done you can save it as an action list for reuse. All you need is a player that can play it back. It is not that many line of codes you need...
One of my action script goes like this: LomoPaint.act
Median:30|E:4|E:50 Convolution:254|K:-2,-2,-2,-2,-2,-2,-1,-1,-1,-2,-2,-1,42,-1,-2,-2,-1,-1,-1,-2,-2,-2,-2,-2,-2,2 MedianCut:68 Oil paint:70|E:3|E:5 Median:30|E:3|E:50 Convolution:254|K:0,0,0,0,1,1,0,1,1,4 Cross blur:80|E:30|E:9 Convolution:254|K:-5,-5,-5,-5,42,-5,-5,-5,-5,2 Median:30|E:6|E:50 Convolution:254|K:-5,-5,-5,-5,42,-5,-5,-5,-5,2 Curves:255|Y:0,0,110,103,185,203,255,255;0,0,86,55,130,127,173,204,255,255;0,0,123,128,179,198,255,255;0,0,61,85,128,128,200,174,255,255
Hope this was to some help...
Roy M Klever Klever on Delphi - www.rmklever.com |
|
|
AndyColmes
USA
351 Posts |
Posted - May 11 2015 : 02:42:12
|
Hi Uwe,
Thanks for the tip. I will definitely check it out.
Andy |
|
|
AndyColmes
USA
351 Posts |
Posted - May 11 2015 : 02:44:27
|
Hi Roy,
Wow, thanks very much Roy, this is a great way, but quite involved. I guess the key is the player and be able to parse all the data from the "action script" to replay.
Andy
|
|
|
AndyColmes
USA
351 Posts |
Posted - May 22 2015 : 07:45:11
|
Hi Roy,
Just trying to figure out the framework for a player to replay the settings. I would like to save selections and restoring them. I think ImageEn can save selections to a file but for a player to restore it, I guess I have to restore as a file also, which means I have to save the selection file as well. What is your recommendation on this?
Thanks Roy. I look forward to your expert advise.
Andy
|
|
|
rmklever
Norway
51 Posts |
Posted - May 22 2015 : 17:28:15
|
Hi Andy,
I would just make a folder and store all selections in that folder. In the action saver you just store the filename of the selection. When playing it back you just load the selection from the file.
Fx: Selection:255|F:TestSelection.sel
This would be like description, fx id, kind of selection (F would be file) then the filename.
Hope this helps. Just ask if you need more suggestions.
In my player I use stringlists which are quite easy to work with. I have not worked with selections like this but think it should work just fine.
Roy M Klever Klever on Delphi - www.rmklever.com |
|
|
AndyColmes
USA
351 Posts |
Posted - May 24 2015 : 05:15:52
|
Hi Roy, thank you very much for the guidance. That sounds like a good way to go.
Andy
|
|
|
|
Topic |
|
|
|