--- a
+++ b/src/vips/plug.c
@@ -0,0 +1,69 @@
+#include <stdio.h>
+
+#include <vips/vips.h>
+
+#include "transform.h"
+
+int transform_image_build( IMAGE *out, pt_transform *trn, 
+	const int xsize, const int ysize );
+
+static int
+transform_image_build_vec( im_object *argv )
+{
+	IMAGE *out = argv[0];
+	char *transform = argv[1];
+
+	/*These two variable are not necessary now, as we are getting the width and height 
+	from pt_script	*/
+	int width = *((int*)argv[2]);
+	int height = *((int*)argv[3]);
+
+	pt_transform *trn;
+
+	/*width and height will be loaded from pt_script	*/
+	if( !(trn = transform_new_from_file( transform, &width, &height )) ) {
+		im_error( "transform_image_build", 
+			_( "unable to build transform" ) );
+		return( -1 );
+	}
+
+	if( im_add_close_callback( out, 
+		(im_callback_fn) transform_destroy, trn, NULL ) ) {
+		transform_destroy( trn );
+		return( -1 );
+	}
+
+	if( transform_image_build( out, trn, width, height ) )
+		return( -1 );
+
+	return( 0 );
+}
+
+static im_arg_desc transform_image_build_arg_types[] = {
+	IM_OUTPUT_IMAGE( "out" ),
+	IM_INPUT_STRING( "transform" ),
+	IM_INPUT_INT( "width" ),
+	IM_INPUT_INT( "height" )
+};
+
+static im_function transform_image_build_desc = {
+	"transform_image_build",	/* Name */
+	"build a transform image",	/* Description */
+	0,				/* Flags */
+	transform_image_build_vec, 	/* Dispatch function */
+	IM_NUMBER( transform_image_build_arg_types ),/* Size of arg list */
+	transform_image_build_arg_types /* Arg list */
+};
+
+static im_function *function_list[] = {
+	&transform_image_build_desc
+};
+
+/* Define the package_table symbol. This is what VIPS looks for when loading
+ * the plugin.
+ */
+G_MODULE_EXPORT im_package package_table = {
+	"transform",			/* Package name */
+	IM_NUMBER( function_list ),	/* Function list */
+	function_list
+};