Search code examples
asp.netimageimage-processingeditordata-transfer

Advanced image editing off the web


I'm building an app in ASP.NET that will store some pictures of objects. The pictures will be uploaded by suppliers and downloaded by subscribers. In between, they will have to be edited before becoming available to subscribers.

The editing involves creating a cropping path tightly around the object in the picture, in which some advanced desktop image software will have to be used I suppose.

My problem is in exchanging pictures between my ASP.NET app and the desktop software in a manner that is easy and transparent for the user.

I've done some thinking and I've come up with: - Manually downloading and uploading the image (Not much user friendly...) - An image editing program that can upload to a web service (Haven't found yet...) - Develop a plug-in for an image editing program (Too advanced...)

I'd appreciate any suggestions you may have, thank you!


Solution

  • It sounds like you need some automation to move files between the web server and a file share. I am assuming that the number of images that need to be processed is pretty large, because if it's not, then the overhead of downloading/re-uploading each would not be that much.

    So do the following:

    1) Create an API for your web app that lists files that are available, or new files since some date/time, or files that have been marked as "new". The API should probably also allow marking a status on them (so you can tell it when you've finishing pulling something down, and it won't be offered again) if you don't want to trust date/time as an indicator of it being new.

    2) Write an app (non-web) that runs on a schedule and uses this API to automatically download files to a shared filesystem area in your local network, and marks them as "downloaded"

    The app should also monitor these files (the ones it downloaded & saved to your local share) for changes, and if changed, upload them back to your web app. To do this you may need to keep a database of filenames and modification dates/times.

    This shouldn't be too hard to write in whatever language you are using for your web (assume c# or vb). By "API" I just mean, a web page that provides a list in a standardized format (e.g. json) that you can parse with your automation application, and another page that allows posting the file back for re-upload.

    I'm assuming that the web server is not your own, or generally, you can't simply have it save the file uploads directly to some area where your image editors can access them. Otherwise you could just do that.