Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

"resizeImages.cfm"
<cfsetting requesttimeout="10000000">
	
<cfset oImageFormTool=createObject("component", "farcry.core.packages.formtools.image") />
<cfquery name="qImages" datasource="#application.dsn#">
	SELECT * FROM
	dmImage where sourceImage != '' and status='approved'
</cfquery>

<cfloop query="qImages" >
	<cfscript >
		stargs=structnew();
		stargs.source="#application.path.imageRoot#/#qImages.sourceImage#";
		stargs.destination="#application.path.imageRoot#/#application.stCoapi.dmImage.stProps.ThumbnailImage.METADATA.ftdestination#";
		stargs.width=  application.stCoapi.dmImage.stProps.ThumbnailImage.METADATA.ftimagewidth;
		stargs.height=application.stCoapi.dmImage.stProps.ThumbnailImage.METADATA.FTIMAGEHEIGHT;
		stargs.interpolation=application.stCoapi.dmImage.stProps.ThumbnailImage.METADATA.ftinterpolation;
		stargs.resizeMethod=application.stCoapi.dmImage.stProps.ThumbnailImage.METADATA.FTAUTOGENERATETYPE;

		streturn=oImageFormTool.generateImage(argumentCollection=stargs);

		stargs=structnew();
		stargs.source="#application.path.imageRoot#/#qImages.sourceImage#";
		stargs.destination="#application.path.imageRoot#/#application.stCoapi.dmImage.stProps.standardImage.METADATA.ftdestination#";
		stargs.width=  application.stCoapi.dmImage.stProps.standardImage.METADATA.ftimagewidth;
		stargs.interpolation=application.stCoapi.dmImage.stProps.standardImage.METADATA.ftinterpolation;
		stargs.resizeMethod=application.stCoapi.dmImage.stProps.standardImage.METADATA.FTAUTOGENERATETYPE;

		streturn=oImageFormTool.generateImage(argumentCollection=stargs);
	</cfscript>

	<cfoutput>
		#qImages.title# done.. <br/>
		<cfflush  />
	</cfoutput>
</cfloop>

</cfsetting>



  • No labels