Changeset 59 for trunk/Forms
- Timestamp:
- Dec 8, 2021, 11:33:52 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.pas
r58 r59 288 288 Stream: TMemoryStream; 289 289 JpegImage: TJpegImage; 290 GifImage: TGIFImage; 290 291 PngImage: TPortableNetworkGraphic; 291 292 begin … … 344 345 PngImage.Free; 345 346 end; 347 end else 348 if PhotoProperty.Attributes.IndexOf('GIF') <> -1 then begin 349 GifImage := TGIFImage.Create; 350 try 351 try 352 GifImage.SetSize(ImagePhoto.Picture.Bitmap.Width, ImagePhoto.Picture.Bitmap.Height); 353 GifImage.Canvas.Draw(0, 0, ImagePhoto.Picture.Bitmap); 354 GifImage.SaveToStream(Stream); 355 except 356 end; 357 finally 358 GifImage.Free; 359 end; 346 360 end else begin 347 361 try … … 372 386 JpegImage: TJpegImage; 373 387 PngImage: TPortableNetworkGraphic; 388 GifImage: TGIFImage; 374 389 Stream: TMemoryStream; 375 390 PhotoProperty: TContactProperty; … … 436 451 PngImage.Free; 437 452 end; 453 end else 454 if PhotoProperty.Attributes.IndexOf('GIF') <> -1 then begin 455 GifImage := TGIFImage.Create; 456 try 457 try 458 GifImage.LoadFromStream(Stream); 459 with ImagePhoto.Picture.Bitmap do begin 460 PixelFormat := pf24bit; 461 SetSize(GifImage.Width, GifImage.Height); 462 Canvas.Draw(0, 0, GifImage); 463 end; 464 ProfilePhotoActive := True; 465 except 466 ProfilePhotoActive := False; 467 end; 468 finally 469 GifImage.Free; 470 end; 438 471 end else begin 439 472 try
Note:
See TracChangeset
for help on using the changeset viewer.