As we are doing the batch job, we are supposed to do resize 7 images for an
item (1 super size image to 7 different size images). We are having close to
100 items per day. If we do the imaging module route as suggested in tutorial,
we need 700 http calls to be done. We debugged and took the api and generating
the images. While doing so, we are getting the red layer above the resized
images.
is there any specific parameter to be provided for a generator to generate?
final ImagingModuleConfig config = (ImagingModuleConfig) ModuleRegistry.Factory
.getInstance().getModuleInstance("imaging");
final ImageGenerator generator = config.getGenerators().get(
"myOperationChain");// Generator name
final ParameterProviderFactory parameterProviderFactory = generator
.getParameterProviderFactory();
final Session session = MgnlContext.getJCRSession("dms");
Node node = session.getNode(value);
Content content = info.magnolia.cms.util.ContentUtil
.asContent(node);
final ParameterProvider<Content> p = new ContentParameterProvider(
new SimpleEqualityContentWrapper(content));
BufferedImage bufferedImage = generator.generate(p);
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=9227baac-b2a2-463b-bccd-81b2e40a8082
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------