Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TGifImage

Empfohlene Antworten

Veröffentlicht

Hallo

Ich habe folgendes Problem und zwar möchte ich ein Image

in meinem Programm abspielen.

Dazu hab ich erstmal ein Demoprogramm erstellt.


  demo = new TGIFImage();

  demo->LoadFromFile("sonne6.gif");

  Rect.Left = 0;

  Rect.Top = 0;

  Rect.Right = 50;

  Rect.Bottom = 50;


  i = 0;


  Timer1->Interval = 80;

  Timer1->Enabled = true;


void __fastcall TForm2::Timer1Timer(TObject *Sender)

{

  demo->Bitmap->Canvas->Brush->Color = clWhite;

  demo->Bitmap->Canvas->Rectangle(0,0,50,50);

  demo->Images->Frames[i]->Draw(Form2->Canvas,Rect,true,false);

  i++;


  if (i >= demo->Images->Count )

  {

	i = 0;

  }

Habe folgendes Problem,

wenn ich mein Gif "abspiele" dann bleiben die abgespielten Bilder stehen.

Also wenn ich ne aufgehende Sonne hab , geht sie nur einmal auf :S

Das erste Bild übermall dann nicht mehr das letzte.

also die Darstellung ist so sehr unsauber. bzw. nicht korrekt.

Hat jemand Ideen wie ich das TGifImage lösche?!

Oder Vorschläge wie ich noch vorgehen könnte?!

Mfg

Alex

  • Autor

Hallo

Jetzt bin ich weggegangn von dem TGifImage

da ich eine Pascaldatei gefunden habe, die es ermöglicht,

das auch ein normales TImage, animierte Gifs darstellen kann.

Jedoch habe ich das Problem das ich in meinem bisherigen Programm,

Alles auf BMP gemünzt hatte,

sprich sowas wie


ImageListNeu->GetBitmap(ListView1->Items->Item[ListView1->Selected->Index]->ImageIndex,

                          DBImage1->Picture->Bitmap);

  DBImage1->Refresh();

oder

Graphics::TBitmap *bmp;

  bmp = new Graphics::TBitmap();


  bmp->Height = 32;

  bmp->Width = 32;


  TBlobStream *pBS;


	pBS = (TBlobStream*)QZustandstext->CreateBlobStream

	pBS->Seek(0, soFromBeginning);

	bmp->LoadFromStream(pBS);

	if (bmp->Height == 32  &&  bmp->Width == 32)

              ImageListZT->Add(bmp, NULL);

Aber da ich ja jetzt auch GIFs nutzen will

komm ich hier nicht mehr klar.

Wie muss ich das umstellen?!

Komm nicht drauf.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.