how to detect bad photos using asp.net c#
(at the time of picture upload)
please help me... urgent.... please help
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohamed AbedallahPosted Jun 15, 2017, 11:07 AM
Do you mean a user might upload a file that's not a valid image at all? If yes, the code to detect such a file would be:
Leadtools.Codecs.RasterCodecs codecs = new Leadtools.Codecs.RasterCodecs();
try
{
Leadtools.Codecs.CodecsImageInfo info = codecs.GetInformation(fileName, false);
}
catch (Exception ex)
{
//Console.WriteLine("problem with image file " + ex.Message);
}
If you mean you want to detect images that have too much red tone in them, this will only work if all your images are for the same subject. This means are the images coming from a production line in a factory, where all the photos will have the same lighting and same object being photographed?
If not, how can you tell the red tone is not really part of the "good" image? For example, if a person shoots a photo of a red rose up close, it will mostly be red, but it might not be "bad".
Rajkiran SwainPosted Jun 15, 2017, 10:25 AM
Manikandan MurugesanPosted Jun 15, 2017, 8:39 AM
Harikrishnan VgPosted Jun 15, 2017, 7:32 AM