Bonjour à tous,
j'aimerai afficher dans un TImage une image jpeg redimensionné.
Cependant je n'y arrive que avec une image bmp :
Comment y parvenir avec une image jpeg?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Graphics::TBitmap *Bitmap = new Graphics::TBitmap(); Graphics::TBitmap *bmp = new Graphics::TBitmap(); if (OpenDialog1->Execute()) { bmp->LoadFromFile(OpenDialog1->FileName); Bitmap->Width = 100; Bitmap->Height = 100; Bitmap->Canvas->StretchDraw(Bitmap->Canvas->ClipRect, bmp); Image1->Picture->Graphic = Bitmap; }
Merci d'avance pour votre aide!
Partager