SSP
"SSP" <s...@dt.com> wrote in message
news:%23Ky1RHo...@TK2MSFTNGP12.phx.gbl...
Regards!
Yunwen Bai
Sql Server CE
This posting is provided "AS IS" with no warranties, and confers no rights.
That's a great example... I am however still puzzled over this portion of
the code:
In your code below, you are pointing to an image file which is already a
part of the project:
...................
Stream str =
Assembly.GetExecutingAssembly().GetManifestResourceStream("DbAccess.River
Sumida.bmp");
....................
In my app, I have the code as below, but when I debug, I get a Null Refence
error:
..................
Stream str =
Assembly.GetExecutingAssembly().GetManifestResourceStream("_signature.Signat
ureBits");
...................
What am I doing wrong?
SSP
"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:uboIyRo...@TK2MSFTNGP11.phx.gbl...
I now have another problem. When I tried to read the image from the database
I get a
................
An unhandled exception of type 'System.ArgumentException' occurred in
System.Drawing.dll
Additional information: ArgumentException
................
error
I have no problems reading from the the test database...just my production
database.
SSP
"SSP" <s...@dt.com> wrote in message
news:eCBnD0r...@TK2MSFTNGP10.phx.gbl...
SSP
"SSP" <s...@dt.com> wrote in message
news:%232C55kt...@TK2MSFTNGP11.phx.gbl...
For an example of building these headers see
http://www.alexfeinman.com/download.asp?doc=OnTheFlyBitmap.zip
It in fact contains a ready-to-use function that creates a bitmap from cx,
cy and byte[] pixel data
"SSP" <s...@dt.com> wrote in message
news:ezbfrst9...@TK2MSFTNGP12.phx.gbl...
When I view the results of the sql query of the data entered, both "sig" and
"sig1", have the same data. This cannot be true, since they're both entered
from different paramaters i.e. _signature and _signature1
//The problem lies here.
Stream mstr;
Stream mstr1;
mstr = new MemoryStream(_signature.SignatureBits);
mstr1 = new MemoryStream(_signature1.SignatureBits);
byte [] sigData = new byte[mstr.Length];
byte [] sigData1 = new byte[mstr1.Length];
// Read it into byte array
mstr.Read(sigData, 0, (int)mstr.Length);
mstr1.Read(sigData1, 0, (int)mstr1.Length);
where am I going wrong?
SSP
"SSP" <s...@dt.com> wrote in message
news:%232C55kt...@TK2MSFTNGP11.phx.gbl...
"SSP" <s...@dt.com> wrote in message
news:e2DGdmy9...@TK2MSFTNGP11.phx.gbl...
I looked at both your examples and have tried to save the signature as an
image in the database, but it only saves a black image.
I am passing "_signature.SignatureBits" as the byte[]
---X----X----
int h = 120, w = 216;
byte [] datax = _signature.SignatureBits;
byte[] sigbitmap = CreateBitmap(w, h, datax);
MemoryStream ms = new MemoryStream(sigbitmap);
FileStream fs = new FileStream(@"\sigData.gif", FileMode.Create,
FileAccess.Write);
fs.Write(sigbitmap, 0, sigbitmap.Length);
fs.Close();
Bitmap bmp = new Bitmap(ms);
pictureBox1.Image = bmp;
---X----X----
I really need to be able to save the signature as an image or else...this
app is useless.
SSP
"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:%23q0cEmx...@TK2MSFTNGP11.phx.gbl...
"SSP" <s...@dt.com> wrote in message
news:%23nk8NKA...@TK2MSFTNGP09.phx.gbl...
SSP
"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:OtG80DIA...@TK2MSFTNGP11.phx.gbl...
"SSP" <s...@dt.com> wrote in message
news:%23F9$6HLAEH...@TK2MSFTNGP11.phx.gbl...