Ver Mensaje Individual
  #2  
Antiguo 04-04-2012
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola newtron.

Probá de este modo:
Código Delphi [-]
{ Suponiendo que:
  ListView1.SmallImages:= ImageList1;
  ListView1.ViewStyle:= vsSmallIcon;
}
...
var
  JPEGImage: TJPEGImage;
  Bitmap: TBitmap;
begin
  ...
  JPEGImage:= TJPEGImage.Create;
  Bitmap:= TBitmap.Create;
  try
    JPEGImage.LoadFromStream(stream);
    Bitmap.Height:= JPEGImage.Height;
    Bitmap.Width:= JPEGImage.Width;
    Bitmap.Assign(JPEGImage);
    ImageList1.Add(Bitmap,nil);
    ListView1.Items.Add;
    ListView1.Items[ListView1.Items.Count-1].Caption := 'Imagen';
    ListView1.Items[ListView1.Items.Count-1].ImageIndex := 0;
  finally
    Bitmap.Free;
    JPEGImage.Free;
  end;
...

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita