全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2318
推到 Plurk!
推到 Facebook!

請問有可以在 BCB6 下顯示 GIF 的元件嗎?

答題得分者是:RaynorPao
China Join
中階會員


發表:81
回覆:242
積分:89
註冊:2003-03-12

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-06-05 13:16:36 IP:218.170.xxx.xxx 未訂閱
TGIFIMAGE 2.2 雖然好用但是在 BCB6 下執行顯示圖片時會當掉,想請教各位先進們是否有用過類似的元件呢? Ps.希望能有顯示和分解動態 GIF 圖片的功能。
RaynorPao
版主


發表:139
回覆:3622
積分:7025
註冊:2002-08-12

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-06-05 15:39:39 IP:203.73.xxx.xxx 未訂閱
引言: TGIFIMAGE 2.2 雖然好用但是在 BCB6 下執行顯示圖片時會當掉,想請教各位先進們是否有用過類似的元件呢? Ps.希望能有顯示和分解動態 GIF 圖片的功能。
China Join 你好: (1)找了好久,好像沒有耶?? 其他的大大知不知道呢?? ( class="code"> int giCount=0; int giSpeed=0; void __fastcall TForm1::Button2Click(TObject *Sender) { TGIFImage *gif=new TGIFImage; gif->LoadFromFile("GifDemo.gif"); giCount=gif->Images->Count; giSpeed=gif->AnimationSpeed; for(int i=0; iImages->SubImages[i]->Bitmap->SaveToFile(IntToStr(i) ".bmp"); Image1->Canvas->CopyRect(Rect(0, 0, Image1->Width, Image1->Height), gif->Images->SubImages[i]->Bitmap->Canvas, Rect(0, 0, gif->Images->SubImages[i]->Bitmap->Width, gif->Images->SubImages[i]->Bitmap->Height)); Sleep(giSpeed*2); Application->ProcessMessages(); } delete gif; } 備註: 有注意到我特別把 Count 及 Speed 設為全域變數嗎?? 以上的範例程式碼只能 播放一次,如果想要連續播放的話,可以依照自己的需求修改,把部分的程式碼 放到 Timer 裡面(必須配合全域變數),即可達成目的 <><>測試環境: > --
------
-- 若您已經得到滿意的答覆,請適時結案!! --
-- 欲知前世因,今生受者是;欲知來世果,今生做者是 --
-- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 --
China Join
中階會員


發表:81
回覆:242
積分:89
註冊:2003-03-12

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-06-05 16:13:35 IP:218.170.xxx.xxx 未訂閱
讓包子兄百忙之中,還幫小弟寫程式,太感激了 ... ⊙﹏⊙∥
China Join
中階會員


發表:81
回覆:242
積分:89
註冊:2003-03-12

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-06-05 16:38:38 IP:218.170.xxx.xxx 未訂閱
包子前輩,小弟發現有些 GIF 圖檔用這個方法執行會有問題耶,如下面這個恐龍執行後會當機,產生的圖形也怪怪ㄉ ...    偶把檔案放到上傳區,您如果有空的時候可以幫忙看看ㄇ VERY THX    
RaynorPao
版主


發表:139
回覆:3622
積分:7025
註冊:2002-08-12

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-06-05 21:29:01 IP:61.221.xxx.xxx 未訂閱
引言: 包子前輩,小弟發現有些 GIF 圖檔用這個方法執行會有問題耶,如下面這個恐龍執行後會當機,產生的圖形也怪怪ㄉ ... 偶把檔案放到上傳區,您如果有空的時候可以幫忙看看ㄇ VERY THX
China Join 你好: (1)請問你有試過別的圖嗎?? 別的圖也會這樣嗎?? 還是只有這一張會呢?? ( > --
------
-- 若您已經得到滿意的答覆,請適時結案!! --
-- 欲知前世因,今生受者是;欲知來世果,今生做者是 --
-- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 --
China Join
中階會員


發表:81
回覆:242
積分:89
註冊:2003-03-12

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-06-05 21:51:05 IP:218.170.xxx.xxx 未訂閱
1.小弟測試的結果約有三成的圖片解析成單張會有問題,小弟已經上傳了三個執行會有問題的程式圖片到會員上傳區,恐龍這一張 Access Violation,另外兩張動物的則是解析單張顯示時會有問題。    2.小弟用兩種版本的 Ulead GIF Animator 測試,3.0 版正確顯示,另一個比較舊的版本則第一張顯示完整其他張顯示的是部分圖片,我想這應該是另一種格式的 GIF 動畫吧?    3.恐龍這一張動畫檔分解成單張也是會有問題,我想可能是資料遺失得嚴重造成存取錯誤,因為他顯示出來的情形和我之前用 UDP 傳送圖片失敗的樣子很像ㄚ    這個問題在 BCB5 下也一樣,單張顯示會有問題,但是用 Image 直接載入 GIF 圖片倒是都可以完整播放,不知是否擷取方式的問題?    太麻煩您了,有空再弄吧,小弟也找了一下午的元件,似乎不容易發現,還在繼續努力中 ... 謝謝!辛苦ㄌ 
China Join
中階會員


發表:81
回覆:242
積分:89
註冊:2003-03-12

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-06-06 22:14:27 IP:218.170.xxx.xxx 未訂閱
小弟發現那幾張圖應該是新版的 GIF 也就是 GIF89M 格式的檔案,但是不 確定,下面是 GIF 各版本的規格說明,如果各位大大有興趣希望可以幫忙 研究,到了 BCB6 的版本竟然還沒有支援 GIF 格式,專利這東西有時候還 真麻煩ㄋ ... http://www.wotsit.org/download.asp?f=gif http://www.wotsit.org/download.asp?f=gif89a http://www.wotsit.org/download.asp?f=gif89m 發表人 - China Join 於 2003/06/06 22:16:40
catpin
一般會員


發表:0
回覆:2
積分:0
註冊:2004-02-04

發送簡訊給我
#8 引用回覆 回覆 發表時間:2004-02-04 15:21:16 IP:140.112.xxx.xxx 未訂閱
請問該如何利用GIFImage寫顯示gif的程式?!        
引言: 小弟發現那幾張圖應該是新版的 GIF 也就是 GIF89M 格式的檔案,但是不 確定,下面是 GIF 各版本的規格說明,如果各位大大有興趣希望可以幫忙 研究,到了 BCB6 的版本竟然還沒有支援 GIF 格式,專利這東西有時候還 真麻煩ㄋ ... http://www.wotsit.org/download.asp?f=gif http://www.wotsit.org/download.asp?f=gif89a http://www.wotsit.org/download.asp?f=gif89m 發表人 - China Join 於 2003/06/06 22:16:40
Yi Ping Chao
------
Yi Ping Chao
catpin
一般會員


發表:0
回覆:2
積分:0
註冊:2004-02-04

發送簡訊給我
#9 引用回覆 回覆 發表時間:2004-02-04 15:41:07 IP:140.112.xxx.xxx 未訂閱
TGIFImage *gif=new TGIFImage;    gif->LoadFromFile("c:\demo.gif");    gif->Images->SubImages[0]->Bitmap->SaveToFile("c:\demo.bmp");    Image1->Picture->LoadFromFile("c:\demo.bmp");        
引言: 請問該如何利用GIFImage寫顯示gif的程式?!
引言: 小弟發現那幾張圖應該是新版的 GIF 也就是 GIF89M 格式的檔案,但是不 確定,下面是 GIF 各版本的規格說明,如果各位大大有興趣希望可以幫忙 研究,到了 BCB6 的版本竟然還沒有支援 GIF 格式,專利這東西有時候還 真麻煩ㄋ ... http://www.wotsit.org/download.asp?f=gif http://www.wotsit.org/download.asp?f=gif89a http://www.wotsit.org/download.asp?f=gif89m 發表人 - China Join 於 2003/06/06 22:16:40
Yi Ping Chao
Yi Ping Chao
------
Yi Ping Chao
SANJYSAN
一般會員


發表:5
回覆:10
積分:3
註冊:2002-05-28

發送簡訊給我
#10 引用回覆 回覆 發表時間:2004-03-14 03:00:39 IP:61.231.xxx.xxx 未訂閱
請問一下,BCB6真的能用TGIFimage嗎?我是說真的有人在BCB6環境下成功試用過GIFImage嗎?    我試不出來,include以後編譯的結果是這樣:    [C++ Error] gifimage.hpp(162): E2040 Declaration terminated incorrectly [C++ Error] gifimage.hpp(287): E2040 Declaration terminated incorrectly [C++ Error] gifimage.hpp(486): E2040 Declaration terminated incorrectly [C++ Error] gifimage.hpp(716): E2040 Declaration terminated incorrectly [C++ Error] uMain.cpp(69): E2277 Lvalue required [C++ Error] uMain.cpp(384): E2285 Could not find a match for 'OpenArray::OpenArray(WideString,unsigned char)' [C Error] uMain.cpp(384): E2285 Could not find a match for 'OpenArrayCount::OpenArrayCount(WideString,unsigned char)' [C Warning] uMain.cpp(478): W8004 'tst' is assigned a value that is never used [C Error] uMain.cpp(807): E2288 Pointer to structure required on left side of -> or ->* [C Error] uMain.cpp(808): E2288 Pointer to structure required on left side of -> or ->* [C Error] uMain.cpp(835): E2285 Could not find a match for 'OpenArray::OpenArray(WideString,int)' [C Error] uMain.cpp(835): E2285 Could not find a match for 'OpenArrayCount::OpenArrayCount(WideString,int)' [C Error] uMain.cpp(1069): E2314 Call of nonfunction [C Error] uMain.cpp(1072): E2277 Lvalue required [C Error] uMain.cpp(1116): E2034 Cannot convert 'char *' to 'TMetaClass *' [C Error] uMain.cpp(1116): E2342 Type mismatch in parameter 'vmt' (wanted 'TMetaClass *', got 'char *') [C Error] uMain.cpp(1116): E2034 Cannot convert 'TMetaClass *' to 'AnsiString' [C Error] uMain.cpp(1116): E2342 Type mismatch in parameter 'ADescription' (wanted 'const AnsiString', got 'TMetaClass *') [C Error] uMain.cpp(1116): E2192 Too few parameters in call 其中前面幾個Declaration terminated incorrectly的內容是gifimage.hpp裡的 __property TGIFVersion Version = {read=GetVersion, nodefault}; __property TGIFVersion Version = {read=GetVersion, nodefault}; __property TGIFVersion Version = {read=GetVersion, nodefault}; __property TGIFVersion Version = {read=GetVersion, nodefault}; 又,我在BCB6用GraphicEx也一樣會有問題: [C Error] MZLib.hpp(539): E2189 extern variable cannot be initialized [C Error] MZLib.hpp(539): E2108 Improper use of typedef 'PZState' [C Error] MZLib.hpp(539): E2293 ) expected [C Error] MZLib.hpp(549): E2189 extern variable cannot be initialized [C Error] MZLib.hpp(549): E2108 Improper use of typedef 'TZState' [C Error] MZLib.hpp(549): E2451 Undefined symbol 'Z' [C Error] MZLib.hpp(549): E2293 ) expected [C Error] MZLib.hpp(552): E2189 extern variable cannot be initialized [C Error] MZLib.hpp(552): E2108 Improper use of typedef 'TZState' [C Error] MZLib.hpp(552): E2293 ) expected [C Error] GraphicEx.hpp(52): E2040 Declaration terminated incorrectly [C Error] GraphicEx.hpp(148): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(174): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(230): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(256): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(284): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(310): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(336): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(370): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(404): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(433): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(459): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(485): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] GraphicEx.hpp(548): E2285 Could not find a match for 'TGraphicExGraphic::CanLoad(const AnsiString)' [C Error] uMain.cpp(69): E2277 Lvalue required [C Error] uMain.cpp(69): E2228 Too many error or warning messages
系統時間:2024-05-19 0:56:55
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!