Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Prism image in Bytearray umwandeln? (https://www.delphipraxis.net/48159-image-bytearray-umwandeln.html)

wabux 21. Jun 2005 14:48


image in Bytearray umwandeln?
 
Hallo,

ich möchte ein image in ein array of byte umwandeln nach dieser Vorlage in VB

Private Overloads Function ImageToBytes( ByVal Img As System.Drawing.Image ) As Byte()
' Konvertiert ein Image-Objekt in ein Byte-Array
Dim IC As New ImageConverter
' Mithilfe des ImageConverter-Objekts ein Image
' in ein Byte-Array überführen
ImageToBytes = CType(IC.ConvertTo( Img, GetType(Byte()) ), Byte())
End Function
-------------------------------------------------------

was mache ich hier falsch?


var bmp : image;
pic : array of byte;
ic : imageConverter;
begin
bmp := bitmap.Create('F:\image.gif');
ic := imageConverter.Create;
result := byte(ic.Convertto(bmp, pic.GetType ) );
end




Danke f. die Hilfe

Luckie 21. Jun 2005 14:49

Re: image in Bytearray umwandeln?
 
Argh und in die Internetsparte gehört es auch nicht. Hier: http://www.delphipraxis.net/internal...ct.php?t=57057 geht es weiter. Geschlossen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz