-
January 15th, 2002, 02:55 AM
#1
How can I show a JPG image from memory?
I have made an ActiveX that communicates with a web camera. When the ActiveX has received an image from the camera (in jpg format) an event is sent to the VB program that uses the ActiveX. How can I show the jpg from the buffer in the ActiveX in the VB program (picturebox or image)? I do not want to save the image to disk and use the LoadPicture function in VB since the camera is streaming pictures all the time.
-
January 15th, 2002, 04:46 AM
#2
Re: How can I show a JPG image from memory?
I made a method in my ActiveX that returned a IPicture* to the VB program and then set the Picture property of a Form to the returned pointer. This works fine but the image quality is not very good. Why?
To try this I let the ActiveX save the picture to disk (jpg file) and then create the IPicture pointer from the same data. Double clicking on the saved JPG file shows an image of the correct quality but if I load the same jpg file to the Picture property of the Form (using LoadPicture function) shows the image with less quality. Why not the same file show in different quality when showing it on the Form?
-
January 17th, 2002, 06:58 AM
#3
Re: How can I show a JPG image from memory?
Vb forms work at 256 colours.
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
January 17th, 2002, 09:17 AM
#4
Re: How can I show a JPG image from memory?
Could you elaborate it please? I didn't quite get it.
-
February 7th, 2003, 02:45 AM
#5
Numinel would you post the code
Hi,
the code you writen (that creates a IPicture from JPG file) is just that i'm looking for. Would you post it here please?
Also it will be interesting if it works with other formats (like GIF for exam).
Thanks a lot
.:: ::.
-
February 7th, 2003, 03:07 AM
#6
Quite some time since I worked with this...
Well...the activex I made is not just a simple code snippet. It consists of ~40-50 files written in pure C++ (i.e. no MFC or ATL).
So if you're not familiar with COM/ActiveX programming in C++ there is no point posting the source here. Sure I could send you the source but I don't have time answering questions about it.
-
February 7th, 2003, 03:15 AM
#7
HELLO FRIEND
I am also aiming to work on video conferencing
so u r activex is of my use
if it then plz .. can u help me
by sharing it
if u want to any help from me..
i am always ready to help u
Thanx
my mail id is Atul_tak@rediffmail.com/hotmail.com
-
February 7th, 2003, 06:35 AM
#8
Thank you
Thank you. Just a minute ago i found what i've searched for.
Check it here:
http://www.codeguru.com/forum/newrep...threadid=27020
The cksiow code creates IPicture from array of bytes or from string variable. He uses OLELoadPicture and does what LoadPicture does except that the parameter isn't a filename but array.
.:: ::.
-
February 7th, 2003, 06:38 AM
#9
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|