-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The image is not being saved to the Sdcard.. Ihave used the follwing code #1
Comments
Seems to be working on the devices I have tested so far. There is a couple configuration issues that may be the problem:
FastImageProcessingView view = new FastImageProcessingView(this);
FastImageProcessingPipeline pipeline = new FastImageProcessingPipeline();
VideoResourceInput video = new VideoResourceInput(view, this, R.raw.birds);
JPGFileEndpoint image = new JPGFileEndpoint(this, true, Environment.getExternalStorageDirectory().getAbsolutePath()+"/FilterPictures/outputImage", true);
/*The video input is outputting to the JPGFileEndpoint*/
video.addTarget(image);
pipeline.addRootRenderer(video);
view.setPipeline(pipeline);
setContentView(view);
pipeline.startRendering();
If none of that works, would it be possible for you to post the full class that you are using or a small sample that demonstrates the code that is not working for you. This would allow me to see if the issue is device specific or a general error. Thanks, |
I am using your AllFiltersExample example source code but in that class the target for for JPGFileEndpoint is not mentioned anywhere So i want know where to mention the output target so that each time when I apply a filter it will create one image or else I want to put a button over there that will create Filtered image for the selected Filter. I am using the following code but it is not creating any image. I can send you the project if you want to see. Thanks and Regards |
Being able to see the project or a similar project with the same issue would be helpful. To convert the AllFiltersExample to use the JPGFileEndpoint, all you have to do is replace all of the lines with "screen" with your new JPGFileEndpoint. If you would like to render to the screen as well as the file endpoint, simply place a copy of the screen line after the line calling to the file endpoint. For example: ...
screen = new ScreenEndpoint(pipeline);
/* Create a new JPGFileEndpoint that will write to the image gallery */
output = new JPGFileEndpoint(this, true, Environment.getExternalStorageDirectory().getAbsolutePath()+"/Download/outputImage", false);
/* Set the JPGFileEndpoint as the output for the initial image */
input.addTarget(output);
input.addTarget(screen);
for(BasicFilter filter : filters) {
/* Set the JPGFileEndpoint as the output for all of the filters */
filter.addTarget(output);
filter.addTarget(screen);
}
...
if(curFilter == 0) {
/* If we are on the first image it is not being filtered so instead of removing a filter we must remove the JPGFileEndpoint and the ScreenEndpoint because we want it to pass through the filter now*/
input.removeTarget(output);
input.removeTarget(screen);
} else {
input.removeTarget(filters.get(curFilter-1));
pipeline.addFilterToDestroy(filters.get(curFilter-1));
}
curFilter=(curFilter+1)%(filters.size()+1);
if(curFilter == 0) {
/* If we are switching back to the first image it should not be getting filtered so we need to add the JPGFileEndpoint and ScreenEndpoint back as the output targets */
input.addTarget(output);
input.addTarget(screen);
} else {
input.addTarget(filters.get(curFilter-1));
... On a side note, if you are using the AllFiltersExample, the layout should not matter because the view is being set programmatically. The only two files that should effect the project are the Activity and the AndroidManifest.xml. If the files are small enough to send by email, you can reach me at [email protected]; otherwise, I would recommend posting the project on github and leaving a link for me. Cheers, |
Thanks I will try the code and if I get any problem then I will post the problem here. Regards |
imageOut = new JPGFileEndpoint(this, true, Environment.getExternalStorageDirectory().getAbsolutePath()+"/FilterPictures/outputImage", true);
but its not working
The text was updated successfully, but these errors were encountered: