Click here to Skip to main content
15,906,626 members
Home / Discussions / C#
   

C#

 
GeneralRe: how insert a row in Access Database? Pin
Christian Graus11-Jan-06 14:38
protectorChristian Graus11-Jan-06 14:38 
Questionread multiple images from database Pin
jung197511-Jan-06 12:41
jung197511-Jan-06 12:41 
AnswerRe: read multiple images from database Pin
Guffa11-Jan-06 12:51
Guffa11-Jan-06 12:51 
GeneralRe: read multiple images from database Pin
jung197511-Jan-06 13:03
jung197511-Jan-06 13:03 
GeneralRe: read multiple images from database Pin
Christian Graus11-Jan-06 13:07
protectorChristian Graus11-Jan-06 13:07 
GeneralRe: read multiple images from database Pin
jung197511-Jan-06 13:09
jung197511-Jan-06 13:09 
GeneralRe: read multiple images from database Pin
Christian Graus11-Jan-06 13:12
protectorChristian Graus11-Jan-06 13:12 
GeneralRe: read multiple images from database Pin
jung197512-Jan-06 10:31
jung197512-Jan-06 10:31 
Here is the revised question.

I have two table: data and image talbe.

Data table
Transactionid documenttype frontimage offset frontimage size
1934318415 CHECK 1 11264
1934318415 COUP 18433 27648
1934318415 COUP 57345 39936

The front/rear offset tell you where the image data in image table begins and the front/rear length tell you how many bytes from the offset to extract to get the image out of the .
Image table..

Image table
Transaction ID, Image
1934318415 <binary>


Below id the logic that I am going to use to retrive the images. Can you help me out writing a code?

//
// Write the logic to retrieve the byte array from the Image table
// … … … …
MemoryStream ImageStream = new MemoryStream (Byte_Array_From_Image_Table);

// You allocate a buffer to hold the image in
Byte[] bytes = new Byte[FrontImageSize + RearImageSize];
int offset = Convert.ToInt32(FrontImageOffset) - 1;

// Move the pointer in your stream to offset position and then read
ImageStream.Seek(offset, SeekOrigin.Begin);
ImageStream.Read(bytes, 0, bytes.Length);

// Create a image object from that buffer
Bitmap bmp = new Bitmap(new MemoryStream(bytes));

// retrive image
-- modified at 16:55 Thursday 12th January, 2006
Question[GDI+] avoid flickering for a moving panel part 2 Pin
Sasuko11-Jan-06 12:04
Sasuko11-Jan-06 12:04 
AnswerRe: [GDI+] avoid flickering for a moving panel part 2 Pin
Christian Graus11-Jan-06 13:06
protectorChristian Graus11-Jan-06 13:06 
AnswerRe: [GDI+] avoid flickering for a moving panel part 2 Pin
Curtis Schlak.11-Jan-06 13:12
Curtis Schlak.11-Jan-06 13:12 
GeneralRe: [GDI+] avoid flickering for a moving panel part 2 Pin
Sasuko11-Jan-06 13:41
Sasuko11-Jan-06 13:41 
GeneralRe: [GDI+] avoid flickering for a moving panel part 2 Pin
Curtis Schlak.11-Jan-06 13:58
Curtis Schlak.11-Jan-06 13:58 
GeneralRe: [GDI+] avoid flickering for a moving panel part 2 Pin
Sasuko11-Jan-06 14:13
Sasuko11-Jan-06 14:13 
GeneralRe: [GDI+] avoid flickering for a moving panel part 2 Pin
exhaulted12-Jan-06 3:39
exhaulted12-Jan-06 3:39 
QuestionCombobox DataSource Pin
code_wiz11-Jan-06 11:57
code_wiz11-Jan-06 11:57 
AnswerRe: Combobox DataSource Pin
Christian Graus11-Jan-06 11:58
protectorChristian Graus11-Jan-06 11:58 
GeneralRe: Combobox DataSource Pin
code_wiz11-Jan-06 12:45
code_wiz11-Jan-06 12:45 
GeneralRe: Combobox DataSource Pin
Christian Graus11-Jan-06 13:03
protectorChristian Graus11-Jan-06 13:03 
GeneralRe: Combobox DataSource Pin
code_wiz11-Jan-06 13:38
code_wiz11-Jan-06 13:38 
GeneralRe: Combobox DataSource Pin
Christian Graus11-Jan-06 13:41
protectorChristian Graus11-Jan-06 13:41 
GeneralRe: Combobox DataSource Pin
code_wiz11-Jan-06 14:39
code_wiz11-Jan-06 14:39 
GeneralRe: Combobox DataSource Pin
Christian Graus11-Jan-06 14:42
protectorChristian Graus11-Jan-06 14:42 
GeneralRe: Combobox DataSource Pin
microsoc11-Jan-06 16:29
microsoc11-Jan-06 16:29 
GeneralRe: Combobox DataSource Pin
code_wiz11-Jan-06 22:18
code_wiz11-Jan-06 22:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.