I have a bunch of images that I want to rotate on their self. Like this example.
Do you know an API that I could use in FME or a transformer that could do the job?
Thanks.
Best answer by jdh
View originalI have a bunch of images that I want to rotate on their self. Like this example.
Do you know an API that I could use in FME or a transformer that could do the job?
Thanks.
Best answer by jdh
View original
Now I have to make my rotation directly from the workbench (at first I though I had to use some functions from ImageMagik and write the code doing the job, but the transformer doesn't support that).
So how can I give my JPG a 3D rotation with an infinite loop? I tried the 3DForcer before 3DRotater but it doesn't change anything, the raster stays in 2D.
@philippeb
You apparently can't rotate rasters in 3D using fme (3Drotator nor 3D affiner).
But you can of course rotate vectors. So, rotate the vector and output for every degree increment, rasterize and send to image magick (with or without the use of a "custom" transformer..)
It'll take a couple of sec to make a bulb like that, I gather.
Given that FME does not currently support 3D affining for rasters, if you would like FME to control the transformation, I suggest using a SystemCaller to run a set of imageMagick scripts to produce the rotation.
See the pan portion of http://www.fmwconcepts.com/imagemagick/rotate3D/index.php
While a true perspective rotation would give superior results, if the image is simple enough it can be approximated by X-compression.
@philippeb
You apparently can't rotate rasters in 3D using fme (3Drotator nor 3D affiner).
But you can of course rotate vectors. So, rotate the vector and output for every degree increment, rasterize and send to image magick (with or without the use of a "custom" transformer..)
It'll take a couple of sec to make a bulb like that, I gather.
While a true perspective rotation would give superior results, if the image is simple enough it can be approximated by X-compression.
Although that would work, it would probably be more efficient to coerce to pointcloud.
Although that would work, it would probably be more efficient to coerce to pointcloud.
Something like this.
Something like this.
After the image Rasterizer add a sorter, numeric, ascending.
If the backside image is the mirror image, then add 18 to the copynum after the 3DRotator.
Although that would work, it would probably be more efficient to coerce to pointcloud.
I have a problem with the AnimatedGIFWriter.
It looks that I can't write files in batch, using an attribute value for the file name.
It gives me a -0 file without any extension.
Can you replicate the problem?
I have a problem with the AnimatedGIFWriter.
It looks that I can't write files in batch, using an attribute value for the file name.
It gives me a -0 file without any extension.
Can you replicate the problem?
Two things to try.
1) Edit the custom transformer to enable Parallel Processing, and set the Parallel Process By to the IMAGEID
2) Use Batch Deploy to process your files
Two things to try.
1) Edit the custom transformer to enable Parallel Processing, and set the Parallel Process By to the IMAGEID
2) Use Batch Deploy to process your files
1- Into the custom transformer I don't see any transformer using the Parallel Processing.
2- I have similar results with the Batch Deploy. It's successful but it writes a -0 file when I put IMAGEID into the output Gif file. It seems that I need a Reader and a Writer (AnimatedGif doesn't count) to make a Batch Deploy. I created a dump Disabled Writer. Not sure how to use the IMAGEID with AnimatedGif in this case.
I thought about a WorkspaceRunner maybe, but again if the AnimatedGif doesn't support attribute values, I'm stuck...
Doesn't work this way neither.
1- Into the custom transformer I don't see any transformer using the Parallel Processing.
2- I have similar results with the Batch Deploy. It's successful but it writes a -0 file when I put IMAGEID into the output Gif file. It seems that I need a Reader and a Writer (AnimatedGif doesn't count) to make a Batch Deploy. I created a dump Disabled Writer. Not sure how to use the IMAGEID with AnimatedGif in this case.
I thought about a WorkspaceRunner maybe, but again if the AnimatedGif doesn't support attribute values, I'm stuck...
Doesn't work this way neither.
I can't find the way to Group By the process though, it's disabled.
And I put Incoming Attributes to All.
What's missing?
However, as written the custom transformer does not work with variables as the attribute name.
The simplest way to fix it is to add a ParameterFetcher before the Aggregator (Parameter Name: GIFOUTPUT), on the Aggregator add the _GIFOUTPUT attribute to the Group By, and on the AttributeCreator replace $(GIFOUTPUT) by @Value(_GIFOUTPUT).
However, as written the custom transformer does not work with variables as the attribute name.
The simplest way to fix it is to add a ParameterFetcher before the Aggregator (Parameter Name: GIFOUTPUT), on the Aggregator add the _GIFOUTPUT attribute to the Group By, and on the AttributeCreator replace $(GIFOUTPUT) by @Value(_GIFOUTPUT).
My final workbench is sooo cool now!! Users will be amazed :D
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.