saving signature

J

jez

I've honestly been looking through more than 50 posts and I wonder whether
someone's got an interesting solution.

I had a look at and played around with Alex's NoteTaker. I have to admit,
it's amazing. You get some kind of graphic file back that is less than a
kiloByte and the quality's great! I don't really care about the format tbh
as I can still open it in Word. The only problem is that I get cannot just
show the panel in of my tabs-it's always on top. Secondly I get a
NullReferenceException when I want to save it. Pretty weird I know.

I also had a look at Martin Stave's post on OpenNETCF.org
(http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=339), but I just don't
quite understand how to use that code in my form. Furthermore, the size
(>300kiloBytes) is enormous compared to the first option. Although I will be
using a storage card in each PPC (probably >256MB) I still don't think this
is the best option as I would also have to synchronize the signatures along
with other data by WiFi every day (approx. 50 signatures per PPC).

Obviously, I didn't forget to look at the thread that explains how to save a
signature as a string. You come out with a file that is about one kiloByte
but then yeh, it's a text file. I'd love to have an easy to open graphic
file without the need to use some other kind of special desktop application.

I also re-opened the MSDN article that explains how to save a signature as a
text file then encrypt it and decrypt it using a custom-made desktop
application. I just don't need the whole encypt-decrypt shmooze and don't
want a text file.

Finally, dearest Hood Canal Systems, I did not forget you. Forgive me if you
are last - but you're not free (cheap is still not free:/). Looks
interesting, I supose I could buy the software and implement it into my
program but I guess I'd more interested to just try out something on my own
or have a look at some other code and try to implement it in my application.

So here goes again, has anyone actually found a way to save a signature to a
graphic file without too much trouble ?

I have looked through so many posts and couldn't find one satisfying answer.

Thanks again
jez
 
C

Chris Tacke, eMVP

Converting to a string is often just a stream of coordinates. That makes
the data size small, and is great for storage, but it doesn't provide any
inherent way to draw it, so the "displayer" must take the coords and turn it
back into an image. Saving as an image file (BMP, JPG, GIF) provides better
integration with consumers since it's a standard format, but it's not as
small, nor as easy to generate in the CF. A GIF will provide the best
size/compatibility, but saving to a GIF requires either an algorithm and a
license (yes it's a licensed format) or a tool that has both.
 
A

Arsa

Hi,
Is there any know jpeg algorithm implementation in managed code somewhere,
that I can use in my application?
Thanks,
Arsa
 
J

jez

Not that I know of.. I think i'm going to have to consider contacting Hood
Canal Systems.
Does anyone have any experience with their software ? How large is the
signature file ?
 
R

Ray Beckett

We tried it a while back. It created a .bmp, not the smallest format. At
the time, it also took several seconds to create/save the file to the PPC.
(Since then, they have implemented the save portion on another thread, so
you just have to capture a 'completed' event.) Then I had to import the
file into SQLCE as a blob. If I recall correctly, the size was in the
200-300k range. It depends on the size of your signature area.

I decided to implement a signature capture system similar to the one in
'Programming Microsoft Windows with C#' by Petzold. It uses a coordinate
system that ends up in the 1-2k size range. Much smaller and faster,
especially when reloading a signature from the SQLCE database or sending the
info to SQL Server 2k. I also implemented the control on the desktop app to
be able to view the signature on the 'admin' side. The last thing I'll do
eventually is to add a 'to image' option for the signature on the desktop
side. That way it can be used in other applications.
 
J

jez

Ray,

I have to admit I read you post three times. It looked like you had the
perfect app.. it's just that yours doesn't write to an image - yet. The 1-2k
size looks amazing although it's not too much of a problem if the signatures
range between 50-100Kb (50x would make about 5MB on a storage card). I think
I'm just going to have to pay $15 for the signature module. Noone seems to
have a nice signature module that saves to a graphic format.

Apart from Alex. His NoteTaker is amazing but I just can't figure out why I
get an exception and how I can make that panel only visible in one tab..
maybe he's willing to help ?

chazak ve'ematz
jez
 
R

Ray Beckett

Incidentally, MS has an application on MSDN that contains a similar style
signature capture control.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/PPCSignatureApp.asp
Of course, the also include a bunch of other stuff with the application.

Wish I had known about this one when I made mine!!!

Really, to implement an image save feature wouldn't take that long, you
would just have to dig into the GDI+ managed libraries.

Anyway, glad you seemed to like what I did (even if you didn't see it!) The
stuff I swiped from Petzold's book was related to the 'Scribble' program.
Then I added the methodology to convert the line coordinates (2 points) to
bytes so I could save them into a blob in SQLCE. I did assume I wouldn't
have any points with values greater than 256, kept any piece of data at the
byte size. We are working on a PPC with a 320x240 screen after all! The
only other thing I did different was to change the OnPaint event to only
update sections of the signature that were in an invalidated clipping
region. This sped up the repaint for drawings/signatures that got fairly
complex.
 
R

Ray Beckett

they are at www.hoodcanalsystems.com. I should point out though, I went to
their site today and it was acting funky!!! Some kind of domain login to
get the graphics for the site kept showing up. Not even sure how to let
them know about it.
 
C

Chris Botha

Funky indeed! Guess their web programmer is testing what happens when
anonymous access to a virtual directory is removed.
 
J

jez

I don't think the whole GDI+ managed libaries is something for me.. i'm
still a uni student working in the CF for a year.. so like I think I managed
to grasp the main things about it but starting with the GDI+ libraries..
hmm.. I don't think I have too much time for that:/ which is sad cos it
probs would solve my problem. I think I'm going to get the signature control
sometime next week.. in the hope that someone will come up with some
beautiful free control in the meantime:p or at least be able to point me out
where I could find some more help.
 
R

Rob Tiffany

My apologies everyone for the Hood Canal Systems website popping up a
Basic Authentication dialog box when accessing the site. We just
changed our hosting company and had a few glitches along the way.
Everything should be fixed though. To answer your question, the
average bitmap size in version 2.1 of our control is between 70-80 Kb.
Not the smallest in the world, but better than 300Kb. When running
on a 2002 device, there is a few second pause when saving the bitmap
and that's why we implemented the background save option. That being
said, on a 2003 device, the bitmap is saved almost instantaneously.
The newest version of the control also contains some fraud reduction
functionality to make it easier for your digital signatures hold up in
a court of law. Send me an email if you'd like to take it for a spin,
I'd be happy to send you a copy.

Rob Tiffany, eMVP
Hood Canal Systems
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top