Image
-
Hi All I have a data of MSSQL Image filed.I have insert picture .bmp then i am getting data like this .
0x433A5C446F63756D656E747320616E642053657474696E67735C4D697274756E6A61795C4465736B746F705C756E7469746C65643131312E626D70
Now i want to convert this data into Image. Plz help me -
Hi All I have a data of MSSQL Image filed.I have insert picture .bmp then i am getting data like this .
0x433A5C446F63756D656E747320616E642053657474696E67735C4D697274756E6A61795C4465736B746F705C756E7469746C65643131312E626D70
Now i want to convert this data into Image. Plz help meYou need to put the data into a stream and load your bitmap from that. SQL Server has no idea what sort of data you stored ( image just means a lump of data in this case, not a picture ).
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
You need to put the data into a stream and load your bitmap from that. SQL Server has no idea what sort of data you stored ( image just means a lump of data in this case, not a picture ).
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Thanks for reply.How to do that can you help me.That time my table have my table have column name "Image" data type "Image".Plz help me
Well, you would use the MemoryStream class and the Bitmap.FromStream method. It's hard to say more without knowing more about your project, but the MSDN examples and the names of the classes to use should be all that you need, anyhow.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi All I have a data of MSSQL Image filed.I have insert picture .bmp then i am getting data like this .
0x433A5C446F63756D656E747320616E642053657474696E67735C4D697274756E6A61795C4465736B746F705C756E7469746C65643131312E626D70
Now i want to convert this data into Image. Plz help meFunction LoadImage(ByVal PicSave As PictureBox) As Image
Dim arrayImage() As Byte = CType(dr.Item("DbFld"), Byte()) Dim ms As New MemoryStream(arrayImage) LoadImage = Image.FromStream(ms) End If End While dr.Close() Return LoadImage End Function
Best Regards, SOFTDEV If you have knowledge, let others light their candles at it
-
Function LoadImage(ByVal PicSave As PictureBox) As Image
Dim arrayImage() As Byte = CType(dr.Item("DbFld"), Byte()) Dim ms As New MemoryStream(arrayImage) LoadImage = Image.FromStream(ms) End If End While dr.Close() Return LoadImage End Function
Best Regards, SOFTDEV If you have knowledge, let others light their candles at it
Well, I try to make people do a little research, but there's enough assumptions and problems with this code that I assume you're doing the same, so.....
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Well, I try to make people do a little research, but there's enough assumptions and problems with this code that I assume you're doing the same, so.....
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.