Determine whether the image has been modified

Source: Internet
Author: User

// If you are using the fileupload control
Byte [] buffer = fileupload1.filebytes;
String STR = buffer [2, 4869]. tostring (); // a 65
STR + = buffer [1, 4870]. tostring (); // D 100
STR + = buffer [4871]. tostring (); // o 111
STR + = buffer [4872]. tostring (); // B 98
STR + = buffer [1, 4873]. tostring (); // E 101
STR + = buffer [4874]. tostring (); // 32
STR + = buffer [4875]. tostring (); // P 80
STR + = buffer [1, 4876]. tostring (); // H 104
STR + = buffer [4877]. tostring (); // o 111
STR + = buffer [1, 4878]. tostring (); // t 116
STR + = buffer [4879]. tostring (); // o 111
STR + = buffer [4880]. tostring (); // s 115
STR + = buffer [1, 4881]. tostring (); // H 104
STR + = buffer [4882]. tostring (); // o 111
STR + = buffer [1, 4883]. tostring (); // P 112
If (STR = "65100111981013280104111116111115104111112 ")
{
// Psprocessed
}

"65100111981013280104111116111115104111112" means "Adobe Photoshop"
Files processed by pswrite Adobe Photoshop CS2 windows information in 1,305th bytes.
In this way, you can get the byte information to see if there is any "Adobe Photoshop" in the byte. If yes, the image is ps.

This method is usually used now.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.