Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Conditional MediaBin tasks
the_greg
I was wondering if anyone knew of a way to conditionally apply transformations in a task. For instance, resize an image if and only if it is out of XYZ specifications. Basically if-else statements.
Are there options for richer task scripting? The reference materials I've found so far do not seem to suggest so.
Thanks
Chris
Find more posts tagged with
Comments
lyman
I am afraid not in this form, although believe me we have thought about it!
The closest we come is an attempt to make sure that primitives gracefully step out of the way if not relevant, therefore, for example, a color converter which converts a file to RGB will correctly "do nothing" if the file started as RGB, and the flattener will similarly do nothing if the incoming images has zero or one layer already.
There is, for example, a hidden parameter to the image sizer which will only allow scaling down and not up so one could say (scale to fit in a 512x512 box if we currently exceed those dimensions).
So, generally we have found that we have been able to accomodate basically all specific cases people have needed without a completely general "if" facility.
That being said, if you could elaborate more fully on your use case there may be ways to accomplish what you are looking for.
Cheers,
Lyman Hurd
the_greg
There is, for example, a hidden parameter to the image sizer which will only allow scaling down and not up so one could say (scale to fit in a 512x512 box if we currently exceed those dimensions).
That sounds like exactly what I was after: a way to scale and image only if exceeds some maximum values.
So am I understanding this correctly:
if use the image scaler that forces an image to be at greatest 100x100 and I put a 100x90 image in there I can have it so no transformation is done? Where can I toggle or set this parameter?
Or are you referring to the "fit to box" option?
Thanks again,
Chris
lyman
If you are set up to preserve aspect ratio and "fit to box", a 100x90 image will remain 100x90 if scaled to fit a 100x100 box. Normally a 50x45 image will be scaled if set to "to to box" 100x100 to a 100x90 image as will a 200x180 image.
The "special" behavior says that you only want downsampling so a 200x180 will still be scaled to 100x90 but a 50x45 will remain 50x45.
We implemented this because otherwise the "big" preview images for really small images looked really bad (e.g., a 512x512 rendition of an image that started with 64x64 pixels!).
Cheers,
Lyman Hurd
jstephan
I am too expecting similar like this. Is it possible to create a task to resize the image only if the height or width is above specified pixels?
lyman
Here's the basic idea for the "secret" parameter. If you make a tset task with the image sizer and export it to XML (what you put as parameters does not really matter as you will see), and then compare it to the PostUpdate task in the System Tasks directory, you will see that there is an "extra" parameter in the post-update that your reference task will not have. You can cut and paste the extra parameter into the XML and re-import.
The effect, as noted, is to "never upsize".
There is no counterpart (make this bigger if it is smaller than X but do not ever downsize).
Cheers,
Lyman Hurd
the_greg
Wow, thank you, I will look into doing that
catorarn
we use MB461/MSSQL2005
I tried to setup
[html]
{BFB513BF-C277-4CFE-92B1-F3796464C83C}
[/html]
in c_PostUpdate.tsk
After it failed to pickup, I restarted the MediaBin Server Service. Still failed to pick up. I saw another user in another thread who put the primitive in 12 different places with the same problem.
Is there a step we did not take into account?
lyman
Hmm this looks correct. This affects the metadata and so you should only need to add it once. I would probably add it to either side of the CBIR primitive.
The system tasks are read fresh at every server start-up (and not before that) and therefore they do not use the normal "import" method. They also do not track versions the way normal user tasks do (the assumption is basically that edits to the system tasks represent system-level changes).
Do you get an error when you try to ingest assets? Recall that the MT primitive requires:
1) You need to have the MT service running.
2) You need to adjust MBSettings to let MB know where to find it.
The only primitive that goes into post update multiple times is the watermarker because one can potentially watermark all siz thumbnails differently (or refrain from watermarking some of them, usually the small ones!).
Cheers,
Lyman Hurd
catorarn
Hi, thanks for replying. I also logged a support case in the meantime.
Here is my c_PostUpdate.tsk contents as it is now:
[html]
{B16D4D06-FF32-11d2-8B1A-00C0F0171F2D}
PostUpdate
This task is used to generate search data and thumbnails for all image files
{59783DC0-F362-11d2-A13A-0000C0C943B3}
{D2F83D80-8663-49b1-997B-0FFE45C58E94}
1.0
false
true
4
{7611DCEB-E9D6-4248-ACC8-97ECC2AFAEE9}
1.0
256
0
true
{5645BE0D-A52A-4f39-BC63-ADBEF43EB4DF}
1.0
-1
1
1
{B9CF8D4A-DBDA-11d2-B9B3-006097C4F0C6}
{8C37D9F0-F681-11d2-BFA1-00A024DB7160}
1.0
0
0
0
0
{82637480-F111-11d2-8181-00104B2A9F09}
{04D3C0C0-5597-11d3-81E2-00104B2A9F09}
1.0
0
0
512.
512.
3
0.
0
true
{06A9DAF0-616D-11d3-81F2-00104B2A9F09}
1.0
true
{45F5D130-0D3E-11d3-BA63-0060971520D2}
{71ec6c70-f8c8-11d2-b881-0000c07e5bb8}
{DEA9B260-F273-11d2-B87F-0000C07E5BB8}
1.0
85
{2B782A2B-FF76-4290-B32E-3D8D7C72BD9D}
1.0
0
255
4
true
{3133E780-F9AB-11d2-B882-0000C07E5BB8}
1.0
0
{82637480-F111-11d2-8181-00104B2A9F09}
{04D3C0C0-5597-11d3-81E2-00104B2A9F09}
1.0
0
0
256.
256.
3
0.
0
true
{06A9DAF0-616D-11d3-81F2-00104B2A9F09}
1.0
true
{71ec6c70-f8c8-11d2-b881-0000c07e5bb8}
{DEA9B260-F273-11d2-B87F-0000C07E5BB8}
1.0
85
{2B782A2B-FF76-4290-B32E-3D8D7C72BD9D}
1.0
0
255
4
true
{3133E780-F9AB-11d2-B882-0000C07E5BB8}
1.0
1
{82637480-F111-11d2-8181-00104B2A9F09}
{04D3C0C0-5597-11d3-81E2-00104B2A9F09}
1.0
0
0
128.
128.
3
0.
0
true
{06A9DAF0-616D-11d3-81F2-00104B2A9F09}
1.0
true
{71ec6c70-f8c8-11d2-b881-0000c07e5bb8}
{DEA9B260-F273-11d2-B87F-0000C07E5BB8}
1.0
85
{2B782A2B-FF76-4290-B32E-3D8D7C72BD9D}
1.0
0
255
4
true
{3133E780-F9AB-11d2-B882-0000C07E5BB8}
1.0
2
{82637480-F111-11d2-8181-00104B2A9F09}
{04D3C0C0-5597-11d3-81E2-00104B2A9F09}
1.0
0
0
64.
64.
3
0.
0
true
{06A9DAF0-616D-11d3-81F2-00104B2A9F09}
1.0
true
{71ec6c70-f8c8-11d2-b881-0000c07e5bb8}
{DEA9B260-F273-11d2-B87F-0000C07E5BB8}
1.0
85
{2B782A2B-FF76-4290-B32E-3D8D7C72BD9D}
1.0
0
255
4
true
{3133E780-F9AB-11d2-B882-0000C07E5BB8}
1.0
3
{82637480-F111-11d2-8181-00104B2A9F09}
{04D3C0C0-5597-11d3-81E2-00104B2A9F09}
1.0
0
0
32.
32.
3
0.
0
true
{06A9DAF0-616D-11d3-81F2-00104B2A9F09}
1.0
true
{71ec6c70-f8c8-11d2-b881-0000c07e5bb8}
{DEA9B260-F273-11d2-B87F-0000C07E5BB8}
1.0
85
{2B782A2B-FF76-4290-B32E-3D8D7C72BD9D}
1.0
0
255
4
true
{3133E780-F9AB-11d2-B882-0000C07E5BB8}
1.0
4
{82637480-F111-11d2-8181-00104B2A9F09}
{04D3C0C0-5597-11d3-81E2-00104B2A9F09}
1.0
0
0
16.
16.
3
0.
0
true
{06A9DAF0-616D-11d3-81F2-00104B2A9F09}
1.0
true
{71ec6c70-f8c8-11d2-b881-0000c07e5bb8}
{DEA9B260-F273-11d2-B87F-0000C07E5BB8}
1.0
85
{2B782A2B-FF76-4290-B32E-3D8D7C72BD9D}
1.0
0
255
4
true
{3133E780-F9AB-11d2-B882-0000C07E5BB8}
1.0
5
{BFB513BF-C277-4CFE-92B1-F3796464C83C}
[/html]
I tried to put the primitive section for MetaTagger up on the top as well as down (2 sections). I tried just the section at the top, removing the bottom one. I tried also without any of the CSO comments.
There are no errors thrown as I can see, neither is MetaTagger updating its log file mtserver_9095.log when I import a PDF.
If I import the same PDF with a MetaTagger insertion task, then keywords are generated fine.
The MBSettings table has localhost mentioned. Both MetaTagger and MediaBin are on the same machine.
This is a development machine, but I need to set this up on a 2 tier installation with both separated in an acceptance and production environment this week.