Open-source gifutility on codeplex

Source: Internet
Author: User

I released several versions of GIF Processing libraries in the garden, and it is indeed laborious to use emails. Many of my friends suggested that I open source code on codeplex. I didn't want to do it in the early stage, I am just too lazy to piece together the lame e-text above. Today I finally made some time to release the GIF animation processing class library on codeplex. You can download it later, project address:

Http://www.codeplex.com/GifLib

I am using the new BSD license open-source protocol. You can also expand and modify this class library. jillzhang thanked everyone for your support and I will keep updating and maintaining this project.

Certificate ------------------------------------------------------------------------------------------------------------------------------------
Last Updated: (first updated)
Update content:
Restructured allCodeThe original code is eager to implement, without too much consideration of the Code's beauty, this time there is no function to add,AlgorithmThere is not much change, but I just used a more reasonable way to refactor the code. I also want to thank many friends in the garden for their enthusiastic guidance and correction.
Change the place more, inconvenient to repeat, interested students directly to the http://www.codeplex.com/GifLib download can be

Certificate ------------------------------------------------------------------------------------------------------------------------------------
Last Updated: (second update)
Update content:
Added the GIF rotation and flip functions. The function is:

/** // <Summary>
/// Rotate or flip the GIF Image
/// </Summary>
/// <Param name = "giffilepath"> original image path </param>
/// <Param name = "rotatetype"> flip or rotate </param>
/// <Param name = "outputpath"> output path </param>
Public static void rotate (string giffilepath, rotatefliptype rotatetype, string outputpath)
Effect
Source image:

Rotate left
 
Interested students directly to the http://www.codeplex.com/GifLib to download it
Bytes ------------------------------------------------------------------------------------------------------
Last Updated: (second update)
New features:
1) cropping GIF images and GIF animations
Function prototype:
/** // <Summary>
/// Crop the GIF Image
/// </Summary>
/// <Param name = "giffilepath"> original image </param>
/// <Param name = "rect"> Cropping Area </param>
/// <Param name = "outfilepath"> output path </param>
Public static void crop (string giffilepath, rectangle rect, string outfilepath) 2) modified the testProgram
Running effect:
Open gifui to display the welcome page

Then, the main interface appears.

The effect after cropping is:

Bytes ----------------------------------------------------------------------------------------------------------------
Last Updated: (third update)
Improvement:
1): modified the text watermark algorithm.
Original practice: Because GIF is based on the color palette image format, it is not possible to add watermark text of any color. If the text color exists in the color palette, then the watermark text will display the specified color. If not, I originally converted the text color to the one closest to the gray value in the color palette. Some netizens also tested it, after a text watermark is added to some images, the text color is changed. I used to do this. without changing the color palette, the color information of the image will not be affected.
This modification retains the original method and changes the method name from watermark to smartwatermark. The current watermark generates a watermark according to the following rules:
1) if there is a text color in the color palette, no special processing is required.
2) Otherwise, if the number of colors in the palette is <256, double the number of colors in the palette and add the text color to the new palette. Finally, modify the location attribute of the animated object GIF image.
If the current color number is 256, the color palette of 256 colors is quantified using the Color quantization algorithm of the 8-tree.
The original watermark effect:

Effect of this modification:

Certificate -------------------------------------------------------------------------------------------------------------------------------------

Codeplex is rarely used. Some time ago, the project file layers on the Code Manager were quite messy. Today, I finally found a solution and reorganized the directory structure on the Code Manager ), download version 4288

Bytes ----------------------------------------------------------------------------------------------------------------
Last Updated: (fourth update)
Update content
1) added the image watermark function.
Only the text watermark function exists in versions earlier than 4288. This time, you can add an image watermark by selecting a static watermark image and watermark position. The effect is shown in:

2) the color of the original text watermark is sometimes black spots.
The original version only quantifies the color palette with an octal tree, but forgets to quantify the image, resulting in color distortion.
3) corrected the scaling error.
The scaling feature has some problems in the last revision and has been fixed.

Please download the latest version 5285 http://www.codeplex.com/GifLib/SourceControl/DownloadSourceCode.aspx? Changesetid = 5855

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.