473,398 Members | 2,335 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,398 software developers and data experts.

composing an image and sending it to sqlserver

hi all

the situation
there is a picbox w a drawing, if the user clicks somewhere on the drawing a
cross is added where he clicked (the cross is a pic in a new picture box),
he can add as many crosses as he wants and if he clicks on a cross it is
removed again. the positions of the crosses are saved in an sql server. this
is all working like a charm.

the problem
i have to get that picture w the crosses in a cristal report.

w i was thinking
save the thing w crosses in an image field in sql server, i dont think
getting it on cr the will be a problem.
but how do i compose an image w a back image and coordinates of the crosses
(the crosses are icons but its no prob to convert them) if the proces is
invisible for the users thats better.

if anyone has an idea :) let me know.
If im not mistaking cor was doing some interesting things w images lately,
could be interesting.
eric
Nov 20 '05 #1
9 1092
Hi Eric,

I'm not clear what you are saying. Is it one PictureBox with an image
and you are drawing crosses on that image, ie. still one PictureBox but
with crosses drawn all over it. Or is it one PictureBox with several
something with crosses overlaid?

|| i dont think getting it on cr the will be a problem.

What's 'on cr' ?

|| but how do i compose an image w a back image and coordinates
|| of the crosses

What do you mean by coordinates? I though you wanted the images of
the crosses.

|| (the crosses are icons but its no prob to convert them)

Convert them to what?

|| if the proces is invisible for the users thats better.

What do want them not to see?
So, more questions than answers I'm afraid.

Regards,
Fergus
Nov 20 '05 #2
Cor
Hi Eric,

I look to it tomorrow I think OK.
Is nothing more for tonight,
And when I forget, please remind me, I think we together can solve this very
easy.

Cor

"EricJ" <er******************@ThiSbitconsult.be> schreef in bericht
news:3f**********************@reader0.news.skynet. be...
hi all

the situation
there is a picbox w a drawing, if the user clicks somewhere on the drawing a cross is added where he clicked (the cross is a pic in a new picture box),
he can add as many crosses as he wants and if he clicks on a cross it is
removed again. the positions of the crosses are saved in an sql server. this is all working like a charm.

the problem
i have to get that picture w the crosses in a cristal report.

w i was thinking
save the thing w crosses in an image field in sql server, i dont think
getting it on cr the will be a problem.
but how do i compose an image w a back image and coordinates of the crosses (the crosses are icons but its no prob to convert them) if the proces is
invisible for the users thats better.

if anyone has an idea :) let me know.
If im not mistaking cor was doing some interesting things w images lately,
could be interesting.
eric

Nov 20 '05 #3
* "EricJ" <er******************@ThiSbitconsult.be> scripsit:
there is a picbox w a drawing, if the user clicks somewhere on the drawing a
cross is added where he clicked (the cross is a pic in a new picture box),
he can add as many crosses as he wants and if he clicks on a cross it is
removed again. the positions of the crosses are saved in an sql server. this
is all working like a charm.


What's exactly the problem?

You can set up a new 'Bitmap' object, grab a 'Graphics' object using
'Graphics.FromImage'. Then you paint the cross onto the bitmap by using
the 'DrawImage' method of the 'Graphics' object. The position can be
obtained by the parameters passed into the PictureBox's 'MouseUp' event
handler. After finishing drawing you can show the bitmap in the
picturebox.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Cor
Hi Eric,

Now I read your message better.

First I thought you did want to make an area map or something. (That is
something I want to do after what I am making now, some kind of dynamic Area
map that floats with the size of the picture, would have a lot of HTML in
it).

But now I see it has to do with
i have to get that picture w the crosses in a cristal report.


I have seen all the regulars here don't like crystal reports and with that
it is me in front.

I dont know why, it is a terrific product, but I don't like it. Maybe the
same reason why I don't like SQL (Although that I don't find terrific, I
have found it forever the worst scripting language that has ever been made
in my eyes).

I have seen that from the regulars there is only one who gives sometimes a
real helpfull (no policeman) answer on a Crystal report question and that is
Armin.

Sorry, I thought a nice chalenge that area map

Cor
Nov 20 '05 #5
sorry for the late replies but i had a long weekend ;p

"Fergus Cooney" <fi****@post.com> wrote in message
news:OC**************@TK2MSFTNGP09.phx.gbl...
Hi Eric,

I'm not clear what you are saying. Is it one PictureBox with an image
and you are drawing crosses on that image, ie. still one PictureBox but
with crosses drawn all over it. Or is it one PictureBox with several
something with crosses overlaid?

one picturebox w several pictureboxes (with crosses overlaid)
|| i dont think getting it on cr the will be a problem.

What's 'on cr' ?

getting a correct image on a cristal report
|| but how do i compose an image w a back image and coordinates
|| of the crosses

What do you mean by coordinates? I though you wanted the images of
the crosses.

in the db i store the coordinates of the crosses so the user can remove add
new crosses or remove old ones
|| (the crosses are icons but its no prob to convert them)

Convert them to what?

never mind that
|| if the proces is invisible for the users thats better.

What do want them not to see?


that im converting and saving the image

Nov 20 '05 #6
hi cor

the problem would be is there an alternative to crystal reports included in
visual studio?

but this problem isn't really crystal related, the final image will end up
in a crystal report thats all.

it seems its rather difficult to explain w i am doing w this but ill give it
another go

imagine 2 pictures from a magazine where you have to find 5 differences

on one of the pics the user can click and where he clicks a cross appears,
if he was wrong he can click the cross and it will dissepear

the original pic is contained in a picturebox and all the crosses are
contained in there own picturebox that i add dinamicly to the original
picture box, i store the coordinates of the crosses in the original
picturebox in a db.
to reproduce this image w crosses in a way the user can still remove them, i
loop the records in the db relevant to the picture and put a picturebox w a
cross in place for each one.

that works, but i need 1 image that contains the background image w the
crosses on it.

to be clear no i'm not making a find the differences game ;p
i think the sollution will be in the direction of herfrieds post

Nov 20 '05 #7
What's exactly the problem?

You can set up a new 'Bitmap' object, grab a 'Graphics' object using
'Graphics.FromImage'. Then you paint the cross onto the bitmap by using
the 'DrawImage' method of the 'Graphics' object. The position can be
obtained by the parameters passed into the PictureBox's 'MouseUp' event
handler. After finishing drawing you can show the bitmap in the
picturebox.


that sounds like w i want (i already have the coordinates) i will try this
next saturday (i work for a different firm on saturdays)
Nov 20 '05 #8
Cor
Hi Eric,

In the VB resource kit are two sample solutions,

When you mix them up I think you have basicly your solution.

I think you would not use that in that way because they look terrible, but
you can take snippets from it.

As you say I am busy with something like that and very much on the route
now.

So when you want to discusse something (a dip to come over, tell me and I
will try to help you).

It are in the resource kit:
In Data Access Samples, Read and Write images from a Database
(very nice sample describing the memory Stream)

In Window Applications Samples, Use GDI+ to manipulate images .Net .....

I thought first it was very difficult but when you know a few tricks it is
simple.
(Fergus did made a nice sample for me, and with that start I got it very
fast in the fingers)

I never could work with rectangle's and so, but that is now also in the
past.

The only thing that for me still is a problem now is the different "codec"
formats from a picture.
I did not find how to get that from a pic, but that is not really necessary
till now.
That format you need when you want to write a picture back or to change
the formats, but when you have the formats that also is not a big deal I use
it (when you search it, it is the encoder class, samples almost only in C#
but those samples are mostly .Net members).

I think with this you will have it done very soon.

Cor

Nov 20 '05 #9
i'll have a look at them next saturday (i don't think my boss here (normal
job) would appreciate it if i'm working on another project while he is
paying me ;) )

the codec things shouldn't be a prob for me (since i can choose w i make of
it myself)
eric

Nov 20 '05 #10

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

Similar topics

2
by: Nis Sarup | last post by:
A customer of mine wants to make a newsletter for their website. The newsletter should be HTML with images and sent to a database of her subscribers. They would like a script where they can easily...
9
by: Krishna Sagiraju | last post by:
Hai, I gotta decode a barcode from an image ( ppm, bmp, or jpg). I realize the first milestone would be to recognize a barcode with in the image: I took a small window (say 80X80 pixels) and if...
2
by: Sergiusz Michalski | last post by:
Hallo!! According to my previous post with popups hanging, now I'm trying to bypass this strange behaviour using loading JavaScript image not by image.src=URL but straight away from stream using...
0
by: Ron | last post by:
Hi there My company is developing a web based document archival and retrieval system, using ASP.NET, c# and sqlserver 2000. This development is in testing at present and all looks promising. ...
1
by: ewehbe | last post by:
I am trying to call this command from an access data base through RUNAPP macro commande: "C:\program files\microsoft sql server\80\Tools\Binn\dtsrun.exe" /S "(local)" /N "mypackage" /E /A mydate:8...
3
by: Dave Keen | last post by:
Hi all. Hope you can help me. This should be easy but I can't make this work. In brief I am building a page of thumbnails using images held in a SQLServer 2000 database. I do this by creating...
1
by: keksy | last post by:
Hi every1, I am writing a small client/server application and in it I want to send an image asynchronous from the client to the server through a TCP socket. I found an example code on the MSDN...
3
by: FFMG | last post by:
Hi, I want to send expiry headers along with my images. This is the code in my .htaccess file Code: -------------------- ...
2
by: ksheerasagar17 | last post by:
Hello All, Scenario: Sending an image through webservice as byte array to an Java webservice. The Problem1: The webservice method image property expects (data type) SByte rather than Byte...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.