tako rade i ovi image view-eri kad postavljas preko njih.
evo ti neki moj kod koji sam koristio da slike jpg i gif prebacim u bmp.
treba malo da ga modifikujes i na kraju sacuvaj Bitmap u neki fajl. za gif ti treba GifImage biblioteka, ima je na torry.net
Code:
if LowerCase(ExtractFileExt(ListView.Items[i].SubItems[0])) = '.bmp' then
Bitmap.LoadFromFile(ListView.Items[i].SubItems[0])
else if LowerCase(ExtractFileExt(ListView.Items[i].SubItems[0])) = '.gif' then
begin
Gif := TGifImage.Create;
try
Gif.LoadFromFile(ListView.Items[i].SubItems[0]);
Bitmap.Width := Gif.Width;
Bitmap.Height := Gif.Height;
Gif.Images.SubImages[0].Draw(Bitmap.Canvas, Rect(0, 0, Gif.Width, Gif.Height), True, False);
finally
Gif.Free;
end;
end
else
begin
Jpg := TDrawJpeg.Create;
try
Jpg.LoadFromFile(ListView.Items[i].SubItems[0]);
Bitmap.Width := Jpg.Width;
Bitmap.Height := Jpg.Height;
Jpg.Draw(Bitmap.Canvas, Rect(0, 0, Jpg.Width, Jpg.Height));
finally
Jpg.Free;
end;
end;
Ride the rainbow, crack the sky
DIY gitare, pojacala i efekti
www.diy-fever.com