Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have column contain 2 format of image as blob when convert and display only one appear and the the other get MESSAGE " parameter ERROR"

Dim bytBLOBData() As Byte = DataSet11.Tables("PORT_IMAGE").Rows(c - 1)("P_IMAGE")
Dim stmBLOBData As New MemoryStream(bytBLOBData)
PictureBox1.Image = Image.FromStream(stmBLOBData)

at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at System.Drawing.Image.FromStream(Stream stream)
at PHOTOSMATCH.Form4.Button1_Click(Object sender, EventArgs e) in E:\PHOTOSMATCH\PHOTOSMATCH\Form4.vb:line 33
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)

What I have tried:

vb code convert blob column with different image format using vs2010 widows application and db2
Posted
Updated 12-Oct-20 10:41am
Comments
Patrice T 12-Oct-20 11:30am    
line of error ?
Patrice T 12-Oct-20 13:47pm    
Use Improve question to update your question.
So that everyone can pay attention to this information.

Which "format" "works" and which doesn't? (Useful detail you left out). I'll guess it's either color or B&W. And since you seems to be using "color settings" in your methods, maybe you need different settings based on "color".
 
Share this answer
 
Comments
Gehan Wafy 1-Nov-20 22:07pm    
all image start with 0000000C6A502 can not be displayed give me error Parameter not valid
all image start with FFD8FFE00010 display with no error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900