|
-
November 15th, 2010, 03:02 PM
#1
image viewers
I am looking for an image viewer in C++ (visual - mfc) that can mainipulate a tif, jpg...with zoom and antialiasing (greyscale) features. Any recommendtaions? I am not interested in anything that requires a runtime license fee (developer - OK, free is better). Any suggestions where to start, investigate...
Thanks in advance
Sharon Gottlieb
-
November 15th, 2010, 08:16 PM
#2
Re: image viewers
You can try this to view:
In : oDataChange:
Code:
void CYourImageViewerDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_STATIC_PREVIEW, ctrlPicturePreview);
}
Open and view image:
Code:
void CYourImageViewerDlg::OpenAndView()
{
CImage myImage;
CString m_strFilter = _T(""); // Show all file
HRESULT hr;
// Open File Dialog
CFileDialog objFileDialog(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, m_strFilter);
if (objFileDialog.DoModal() != IDOK)
return;
// Store the file name.
strFilePath = objFileDialog.GetPathName();
// ==== Load the image into the control box. ===
hr = myImage.Load(strFilePath);
if (SUCCEEDED(hr))
{
ctrlPicturePreview.SetBitmap((HBITMAP) myImage);
}
}
Well, this can view images, but not zoom...
-
November 16th, 2010, 02:15 AM
#3
Re: image viewers
Hi,
have a look at http://www.codeproject.com/KB/graphics/cximage.aspx
It is a library that does what you want, comes with working demos, is free (incl. source code) and compiles with different versions of MSVC.
The performance is ok (although I think there are faster libs, but it's free...).
With regards
Programartist
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
|