Input images are read-only so you cannot assign to them nor is there any way, within Pixel Bender filters, to read an image off disk and assign it to an input image. You need to read the image off disk in the client application and then pass it through to the filter via an input image. Let me know if that's not clear. However, you should first read through the "Pixel Bender Language Reference" (http://www.adobe.com/content/dam/Adobe/en/devnet/pixelbender/pdfs/pixelbender_reference.pd f) and the "Pixel Bender Developer's Guide" (http://www.adobe.com/content/dam/Adobe/en/devnet/pixelbender/pdfs/pixelbender_guide.pdf). I believe these documents will help make the concepts clear.
Thanks for your answer.Now I encounter a question. If I get rid of the statement
my code can run well under Adobe Pixel Bender Toolkit 2,when I run it,it let me choose a image off disk. Then I use File->Export Filter for Flash Player,it will create a test.pbj file, then I call this test.pbj in flash,like follows:
private var ShaderClass:Class;
When I run above code,it raise following error:
ArgumentError: Error #2164:The Shader input src is missing or an unsupported type
I guess I can't choose picture in flash,so it raise above error,right?
How to correct above code?
You still have the input image specified in your kernel, but
you haven't set the value via actionscript.
Have you taken a look at some of the tutorials or videos on the devnet area?
that may help get you going and give you some good code to start with.