473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

VB (5or6) does something wierd with image data

Vb stores an image (bitmap/jpg) in a SQL2000 image field. For some
reason it doubles the size by adding 00 for each byte. But sometimes it
doesn't add 00 (0000.0000) but 01 or 20 or ?? and also the byte that
should be transferd is changed...
So SQLImageData = Imagebyte + 00
and sometimes
SQLImageData = CHANGEDImagebyte + xx.

Some example data: (hex notation):

A1 => A1 00
03 => 03 00
-----------
91 => 18 20
83 => 92 01
8C => 52 01

Could anybody give me an explanation, because I need to know what is
happening, so I can remove te extra bytes added......

I have already a image when I remove the extra bytes, but with some
wrong data (on the place where things like 8C => 52 01 happen)....

Thx,
Geronimo

Apr 27 '06 #1
2 1061
"geronimi" <we******@hotmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Vb stores an image (bitmap/jpg) in a SQL2000 image field. For some
reason it doubles the size by adding 00 for each byte. But sometimes it
doesn't add 00 (0000.0000) but 01 or 20 or ?? and also the byte that
should be transferd is changed...
So SQLImageData = Imagebyte + 00
and sometimes
SQLImageData = CHANGEDImagebyte + xx.

Some example data: (hex notation):


You'll probably want to post that question in a VB Classic group.
They all contain "microsoft.public.vb" in their names.
This and all other groups on the MS server that contain "dotnet" or "vsnet"
in
their names are for VB.Net. While some of the code looks the same, they are
very
different products and require a different set of groups.

Try a group with 'database' in its name.

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Apr 27 '06 #2
I found a solution!

I convert the data like this:
ImageData=System.Text.UnicodeEncoding.Convert(Enco ding.Unicode,Encoding.Def*ault,ImageData);

and the picture is perfect!!
thx for the help!

Apr 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

75
by: Beni | last post by:
I have been programming in C for about a year now. It sounds silly, but I never took the time to question why a C(or C++ or Java) program execution begins only at the main(). Is it a convention or...
5
by: Brian Henry | last post by:
Is there anyway to get a thumbnail of a file similar to the way explorer does that can be used in an application? I want to for example if i drag a file over a picture box, if it has the ability to...
0
by: Danny | last post by:
I am trying to sort my second datagrid. And it works but only after i click 2 times on the column header. The first time i click on the header the data in the right order will add to the rows in...
5
by: SStory | last post by:
Hi all, I really needed to get the icons associated with each file that I want to show in a listview. I used the follow modified code sniplets found on the internet. I have left in...
2
by: geronimi | last post by:
Vb stores an image (bitmap/jpg) in a SQL2000 image field. For some reason it doubles the size by adding 00 for each byte. But sometimes it doesn't add 00 (0000.0000) but 01 or 20 or ?? and also the...
2
by: deisner | last post by:
All- I have a Framework 2.0 application running under Windows 2003 Server and IIS utilizing the default application pool. On my development machine (XP w/ IIS 5.1) the code runs perfectly. But...
2
by: Ed | last post by:
Hope someone can help me out... I have been tasked to read some image data from an sql database and save the files to flat files. OK, sounds easy as I'v used BLOBs before. But this is an old...
7
by: RB0135 | last post by:
Hi All, I have some Windows BMP, 1BPP, monochrome files that I need to get the raw data from to load a graphics buffer on a Roll Printer (which I know can be done). Lets forget about the Roll...
4
by: larry | last post by:
Ok I'm a Python noob, been doing OK so far, working on a data conversion program and want to create some character image files from an 8-bit ROM file. Creating the image I've got down, I open...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.