Hello,
i have an application allowing to take pictures with a (web)cam and select the ones to be saved. These are stored in a IWiaDataTransfer pointer. However, i don't know how to save them, and how to choose the desired file type (bmp,jgp,tiff,gif).
Can someone give me some advice
Thanks a lot!

Saving WIA-acquired pictures
Mydotnet
nictan
But i recall myself having red something in the mdsn documentation that wia provides functionality for saving images in the desired format as well. Sow how should i call these methods It would seem more logic to use these methodes than to use the Bitmap methods. Although i'm not for sure since i don't have many experience with programming for graphical purposes.
Regards
Flor
MDiCarlo
thanks a lot for your replies so far. They have been really useful.
But now i have one very last remaining question. I hope you/someone can help me out on this one.
i have made a application using WIA to grab pictures and store them on disk. But after a lot of use, there remain a lot of captured pictures in the right part of the wia image selection dialog.
I would like to be able to delete these. The method which seems most appropriate is the IWiaItem::DeleteItem method. If i call this method after storing pictures, i can also delete those. However, i would also like to be able to use the DeleteItem button at whatever time i want it to. And not only to delete the pictures which i might have selected. No, i would like to delete all of the pictures which once were taken with the camera using this button.
One can tell me how this should be done
Regards
GIScoobe
SQL Pro
To convert from a CString to an OLESTR, use the ATL A2OLE macro like this:
#include <atlbase.h>
...
USES_CONVERSION;
LPOLESTR p = A2OLE(str);
S&#38;&#35;248&#59;ren Spelling Lund
And what do you mean by "changing the assignment" Which assignment
Regards
JimJams
Thanks!
indeed, setting the lpszFileName with exact path and extension does the job.
But now i still want to process the user input: a normal string for the path, and this has to become a LPOLESTR with always double backslashes. Any idea
a)if there is a method that adds these slashes
b)how i can convert a cstring tot lpolstr
Regards.
Viborito
GUID guidOutputFormat = WiaImgFmt_BMP;
The example lets WIA determine the filename. I'm not up to speed on STGMEDIUM but assume you can set the path for the file to save by assigning stgMedium.lpszFileName. Google for this, I'm not sure how the string needs to be allocated.
rene-poepperl
rajesh_vellore123
the string thing (conversion to olestr) is know resolved.
But as you suggested it's pretty hard to understand how to handle the backslashes. Could you explain it in an other way so it becomes more clear or otherwise refer me to a more detailed explication (site) As for now, if i use single backslashes, the path isn't recognised. That might be because of the conversion from cstring to LPTOLESTR but i'm not sure on that.
Regards