Converting images in Picture Table

jw@amblique.comjw@amblique.com Member Posts: 2
edited 2007-01-16 in Navision Attain
I'm trying to read image (in binary formal - SQL image format) from the Picture table (SQL) and convert them to actual images using .NET.

All attempts at converting the images have been unsuccessfull. Does Navision encrypt these files or add extra bytes? How can I convert them?

This is the vb.net code I'm using.


Dim ms As New MemoryStream

ms.Write(pic.Image1File, 0, pic.Image1File.Length)



Dim bm As Bitmap

bm = New Bitmap(ms)





NOTE: pic.Image1File is the binary array retrieved from SQL.



Any ideas???

Comments

  • kinekine Member Posts: 12,562
    The BLOB fields are Compressed by default. This compression can be disabled in Properties of this field in NAV. But you need to know that the DB will be much bigger than, because all pictures are stored as BMP and these are good for compression. If this compression is disabled... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.