Release a software for batch processing of image printing resolution (DPI) (with source code)

Source: Internet
Author: User

 

Release a software for batch processing of image printing resolutions (DPI)

 

 

Purpose: When you insert an image into a word, you may find that the inserted image is larger or smaller. Very difficult. The reason is that when word is processing an image, the DPI of the image is 96 by default, so for an image with 72dpi, it will become larger when it is inserted into word; for a picture with 300dpi, it will become smaller when it is inserted into word. The ratio is 96/72 or 96/300.

 

The function of the software is to modify the DPI of the image without changing the actual width and height of the image.

 

Software running platform: Windows XP, must install. NET Framework 2.0 or above.

AboutProgramMember:

In fact, the core of the softwareCodeJust a few simple lines of code:


Private   Void Editimagedpi ( String Filename)
{
Lock (Lockobject)
{
Using (Bitmap newimage =   New Bitmap (image. fromfile (filename )))
{
Newimage. setresolution (_ newdpiwidth, _ newdpiheight );
Newimage. Save (_ savefold +   " \\ "   + Getfilenamebyfilefullname (filename ),
System. Drawing. imaging. imageformat. JPEG );
}
}
}< P>

Software: http://files.cnblogs.com/bruceleeliya/EditImageDPI.rar

Source Code address: http://files.cnblogs.com/bruceleeliya/Source_Code_By_EditImageDPI.rar

Related Article

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.