Gifimage and Graphicex learning summary

xiaoxiao2021-03-06  123

Gifimage and Graphicex are learning, put learning experience here with everyone.

Just learning some Gifimage, initially solved the GIF animation display, flashing problem, summarized as follows: 1, gifimage.pas, you don't have to pack installation, just simply add Gifimage.PAS to Project. Uses. 2. To set image1's width, height set to the actual size of GIF images, can reduce flicker, or image1.stretch: = true; 3, when GIF file assign gives Image, pay attention to the differences in the following statement, one only Can get static GIF pictures. Image1.picture.assign (MyGIF); // The correct ASSIGN can get GIF animation. Image1.picture.bitmap.assign (mygif); // can only get static GIF images. The procedure is tested under Delphi7, TGIFIMAGE2.2. Uses gifimage; ... var mygif: tgifimage; begin mygif: = tgifiMage.create; mygif.loadfromfile ('E: /A.GIF'); image1.width: = mygif.width; image1.height: = mygif.height Image1.Picture.Assign (MyGIF); Mygif.Free; end;

Graphicex 9.9 summary: 1. In GraphiceX9.9, the GIF format is closed by default and needs to be opened. The method is to find {$ define useelzw} in the GraphicConfiguration.inc file, change to {$ define useelzw} 2, add the PAS file under Graphicex to the Project, you can recompile the example and support the GIF file . (Note that graphicstrings.pas will join in. Other de, fr, ru should not be added.)

Use GraphiceX 9.9, GIF can't display animation, the program is as follows

Uses graphicexe;

Procedure tForm1.graphiexclick (sender: TOBJECT); var mygif: tgifgraphic; begin mygif: = tgifgraphic.create;

IF mygif.canload ('E: /A.GIF') Then MyGiF.LoadFromfile ('E: /A.GIF');

Image1.Picture.Assign (MyGIF);

MYGIF.FREE; END;

转载请注明原文地址:https://www.9cbs.com/read-125489.html

New Post(0)