I am in need of some code that can be embedded in or called from a VFP program to automatically crop and convert a .bmp file to a .jpg file.
The .bmp files come from a USB web cam. I was hoping to be able to set the video format to have the horizontal and vertical dimensions the same but apparently that would require rewriting the camera drivers. A .jpg output option from the camera driver would have been nice as well. Since neither of these features appear to be available, I believe cropping the image in the same operation that converts it to a .jpg will be a satisfactory solution.
If someone has a recommendation of a package that works well with VFP, it will probably save me a lot of time wading through all the options that Google turns up.
TIA - Joe
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4d6360ce.c438e70a.69ed.1ed0@mx.google.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Can you use gdi+ ?
Al
-----Original Message-----
From: Joe Yoder
I am in need of some code that can be embedded in or called from a VFP
program to automatically crop and convert a .bmp file to a .jpg file.
The .bmp files come from a USB web cam. I was hoping to be able to set the
video format to have the horizontal and vertical dimensions the same but
apparently that would require rewriting the camera drivers. A .jpg output
option from the camera driver would have been nice as well. Since neither
of these features appear to be available, I believe cropping the image in
the same operation that converts it to a .jpg will be a satisfactory
solution.
If someone has a recommendation of a package that works well with VFP, it
will probably save me a lot of time wading through all the options that
Google turns up.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/433FA818DFB14EB3BEE7C7168329EC79@GSL.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
> use gdi+
After you include the gdiplusx into your project, converting the bmp
file to jpg is a two liner :
loBMP =_SCREEN.SYSTEM.Drawing.BITMAP.New(lcBMPFileName)
loBMP.SAVE(lcJPGFileName, _SCREEN.SYSTEM.Drawing.Imaging.ImageFormat.Jpeg)
Sincerely,
_Ajit Abraham
Kingdom of Bahrain
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4D637DBB.7010509@ua-group.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
> -----Original Message-----
> From: profoxtech-bounces@leafe.com
[mailto:profoxtech-bounces@leafe.com]
> On Behalf Of Joe Yoder
> Sent: Monday, February 21, 2011 11:06 PM
> To: profoxtech@leafe.com
> Subject: Saving an image from a web cam
>
> I am in need of some code that can be embedded in or called from a VFP
> program to automatically crop and convert a .bmp file to a .jpg file.
>
> The .bmp files come from a USB web cam. I was hoping to be able to
set
> the video format to have the horizontal and vertical dimensions the
same
> but apparently that would require rewriting the camera drivers. A
.jpg
> output option from the camera driver would have been nice as well.
Since
> neither of these features appear to be available, I believe cropping
the
> image in the same operation that converts it to a .jpg will be a
> satisfactory solution.
>
> If someone has a recommendation of a package that works well with VFP,
it
> will probably save me a lot of time wading through all the options
that
> Google turns up.
>
> TIA - Joe
It's been a few years but I had pretty good success using the DOSADI
product. But looking at their website now I see that the freebie product
i.e. "Classic" does not support JPEG or GIF. You'd prolly have to pay
for that feature.
Afit's suggestion looks pretty doable though...
Thanks,
Matthew Jarvis || Business Systems Analyst
IT Department
McKenzie-Willamette Medical Center
1460 G Street, Springfield, OR 97477 || Ph: 541-744-6092 || Fax:
541-744-6145
--------------------------------------------------------------------------
Disclaimer: This electronic message may contain information that is
Proprietary, Confidential, or legally privileged or protected. It
is intended only for the use of the individual(s) and entity named
in the message. If you are not an intended recipient of this
message, please notify the sender immediately and delete the
material from your computer. Do not deliver, distribute or copy
this message and do not disclose its contents or take any action in
reliance on the information it contains.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/69F310C05DD83C48A84BA3769CE1ECF804500E36@TNTRIEXEVS02.triadhospitals.net
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Jarvis, Matthew wrote:
>> -----Original Message-----
>> From: profoxtech-bounces@leafe.com
> [mailto:profoxtech-bounces@leafe.com]
>> On Behalf Of Joe Yoder
>> Sent: Monday, February 21, 2011 11:06 PM
>> To: profoxtech@leafe.com
>> Subject: Saving an image from a web cam
>>
>> I am in need of some code that can be embedded in or called from a VFP
>> program to automatically crop and convert a .bmp file to a .jpg file.
>>
>> The .bmp files come from a USB web cam. I was hoping to be able to
> set
>> the video format to have the horizontal and vertical dimensions the
> same
>> but apparently that would require rewriting the camera drivers. A
> .jpg
I don't know if this is a possibility for you, but EZTwain can capture
an image directly from a webcam into a JPG, and it also comes with VFP
sample code.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4D63F24E.6030003@taconic.net
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Joe
csXImage Activex/OCX is not free but by far the easiest I have ever found.
http://www.chestysoft.com/ximage/default.asp
Jerry
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
Of Joe Yoder
Sent: Tuesday, February 22, 2011 1:06 AM
To: profox@leafe.com
Subject: Saving an image from a web cam
I am in need of some code that can be embedded in or called from a VFP
program to automatically crop and convert a .bmp file to a .jpg file.
The .bmp files come from a USB web cam. I was hoping to be able to set the
video format to have the horizontal and vertical dimensions the same but
apparently that would require rewriting the camera drivers. A .jpg output
option from the camera driver would have been nice as well. Since neither
of these features appear to be available, I believe cropping the image in
the same operation that converts it to a .jpg will be a satisfactory
solution.
If someone has a recommendation of a package that works well with VFP, it
will probably save me a lot of time wading through all the options that
Google turns up.
TIA - Joe
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/1FF34562B4F94086A3B49F3EDDAD5D6E@jerryfootePC
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.