kodak图象编辑控件的用法

reallucifer 2003-01-21 01:48:06
如何把kodak图象控件中显示的图象保存成一个文件。我知道有一个saveas函数可以保存,但是那个函数里面的参数都是VARIANT,不知道怎么用。最好能给出源代码。
...全文
211 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
reallucifer 2003-01-23
  • 打赏
  • 举报
回复
再问一个问题,如何把文件保存成黑白的图片,要只有黑白两种颜色的,不要那种多级灰度的。
reallucifer 2003-01-23
  • 打赏
  • 举报
回复
不愧是5颗星的高手,多谢了
masterz 2003-01-23
  • 打赏
  • 举报
回复
found in MSDN(2001 Oct)
Other SDK Documentation->Imaging for Windows->Imaging ActiveX Controls Reference->Reference by control->Image edit control->Methods.
masterz 2003-01-23
  • 打赏
  • 举报
回复
SaveAs Example VC++
Example 1

This example shows how to convert an image, burn in annotation marks, and save the image under a new file name.

void CImgEdit1Dlg::OnBurnin()
{
// Converts an image, burns in annotation marks and saves
// it under a new file name

#define ALL_MARKS 0
#define WINDOWS_DEFAULT 2

// If you wish to save color annotations on a black
// and white image you must first convert the
// image to a non black and white type
VARIANT vRepaint; V_VT(&vRepaint) = VT_BOOL; V_BOOL(&vRepaint) = TRUE;
VARIANT evt; V_VT(&evt) = VT_ERROR; // set to default
ImgEdit1.ConvertPageType(5,vRepaint); // wiPageTypePal8, True
// Save all marks in their original colors
ImgEdit1.BurnInAnnotations(ALL_MARKS, WINDOWS_DEFAULT,evt);
// Color Burn in always converts to RGB24. To save disk space,
// save the image as an 8 bit palettized image
VARIANT vFileType; V_VT(&vFileType) = VT_I2; // set FileType for saveas
VARIANT vPageType; V_VT(&vPageType) = VT_I2; // set to PageType for saveas
V_I2(&vFileType) = 1;
V_I2(&vPageType) = 5;
// wiFileTypeTIFF, wiPageTypePal8
ImgEdit1.SaveAs("C:\\imgsave\\annotate.tif",vFileType,vPageType,evt,evt,evt);
}
Example 2

This example shows the options that are available for file linking/copying when performing a SaveAs of an Imaging 1x server document.

void CImgEdit2Dlg::OnFilelinking()
{
// An example of the options available for file linking/
// copying when performing a SaveAs of a 1x server document.
VARIANT evt; V_VT(&evt) = VT_ERROR; // set to default for saveas

// Option 1
// Request files associated with the document being
// saved be copied to new files in a location to be
// specified. This is the default and in most cases
// the preferred method to use.
ImgAdmin1.SetForceFileLinking1x(FALSE);

// To specify location of the new files, use the Admin
// control FileStgLoc1x property
ImgAdmin1.SetFileStgLoc1x("Image://servername\\new_images:");

// Displayed 1x document is saved to a new document name
// Associated image files will be copied to new randomly
// generated file names in directory specified
ImgEdit1.SaveAs ("Image://servername\\doc_db:\\CABNAME\\DRAWER\\FOLDER\\NEW DOC",
evt,evt,evt,evt,evt);

// Option 2
// Request files associated with the document being
// saved reference the original files. This results in
// multiple documents accessing the same files -- could
// be useful to prevent rewrites of optical disk files.
ImgAdmin1.SetForceFileLinking1x(TRUE);

// Displayed 1x document is saved to a new document name
// but original image files are linked to the new document.
ImgEdit1.SaveAs ("Image://servername\\doc_db:\\CABNAME\\DRAWER\\FOLDER\\NEW DOC",
evt,evt,evt,evt,evt);
}
reallucifer 2003-01-22
  • 打赏
  • 举报
回复
怎么没人回答啊,难道就没人懂吗?如果有人帮我搞定,我立刻再开帖加分,要多少都可以。

15,976

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧