|
Wang has extended TIFF tags but what is the problem here?
What are the "traditional methods of open tiff image" that don't work?
A properly implemented TIFF loader either understands the tags it needs and can open the image
or if it can't follow the tags then the format is unsupported or the TIFF image is malformed.
If GDI+ can open it then it's probably a valid TIFF image. If the format is not supported by
Photoshop then that's Adobe's problem.
What is your question?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
my question is i do not want open with GDI+,and i want use the code which i programed. so i want know the tag format,then i can open it by my application.
|
|
|
|
|
Then you'll need to know the TIFF specification.
It's held by Adobe and can be found online here[^]
If you run in to problems just ask
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
thanks mark, i will go there and find out the answer.
|
|
|
|
|
Hi everyone,
In an application I got an error mentioned below:
//////////////////////////////////////////////////////////////////////////////
Deleting intermediate files and output files for project 'DlinkCapture - Win32 Debug'.
--------------------Configuration: DecklinkCapture - Win32 Debug--------------------
Compiling resources...
Compiling...
stdafx.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(119) : warning C4005: '_WIN32_WINDOWS' : macro redefinition
c:\documents and settings\ganesh.ganesh\desktop\samples-cap\dlink samples\samples\samples\dlinkcapture\stdafx.h(22) : see previous definition of '_WIN32_WINDOWS'
NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.
c:\documents and settings\ganesh.ganesh\desktop\samples-cap\decklink samples\samples\samples\baseclasses\streams.h(180) : fatal error C1083: Cannot open include file: 'strsafe.h': No such file or directory
Error executing cl.exe.
DlinkCapture.exe - 1 error(s), 1 warning(s)
/////////////////////////////////////////////////////////////////////////////
to avoid this error I installed latest version of Platform SDK even that I am getting error mentioned below:
/////////////////////////////////////////////////////////////////////////////
Deleting intermediate files and output files for project 'DlinkCapture - Win32 Debug'.
--------------------Configuration: DecklinkCapture - Win32 Debug--------------------
Compiling resources...
Compiling...
stdafx.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(119) : warning C4005: '_WIN32_WINDOWS' : macro redefinition
c:\documents and settings\ganesh.ganesh\desktop\samples-cap\dlink samples\samples\samples\dlinkcapture\stdafx.h(22) : see previous definition of '_WIN32_WINDOWS'
c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(222) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
DlinkCapture.exe - 2 error(s), 1 warning(s)
/////////////////////////////////////////////////////////////////////////////
can anyone suggest me how to proceed further.
Looking forward for your help.
with regards,
ganesh
|
|
|
|
|
The version of the platform SDK is not necessarily compatible with VC6. The latest that MS recommend you use is FEB 2003, although I've also found that the XPSP2 update one works.
Steve S
Developer for hire
|
|
|
|
|
Thank you Steve, let me check with that and get back to you..
with regards,
ganesh
|
|
|
|
|
Hi,
I Select an Image on to a CompatibleDC .I get each Pixel and check to see whether Red,Green,Blue of that Pixel are same or not.If so I perform Some Operations and change the color of that Pixel Using SetPixel.
and then Finally I Stretchblt it on to my ClientDC.
HBITMAP hBmpObjSmpl = imgObjSample.GetBMP();
bmpSample.Attach(hBmpObjSmpl);
CDC dcMem;
dcMem.CreateCompatibleDC(pDC);
HBITMAP hOldBitmap=(HBITMAP)dcMem.SelectObject(bmpSample);
BITMAP bm;
bmpSample.GetBitmap(&bm);
for(int i=0;i < bm.bmWidth ; i++)
for(int j=0;j < bm.bmHeight ; j++)
{
COLORREF clr = dcMem.GetPixel(i,j);
int R = GetRValue(clr);
int G = GetGValue(clr);
int B = GetBValue(clr);
if( (R == G) && (G == B))
{
R = (R-nMaxRGB) + dblSampleRGB[0];
G = (G -nMaxRGB) + dblSampleRGB[1];
B = ( B -nMaxRGB ) + dblSampleRGB[2];
R=R*dblillumination;
G=G*dblillumination;
B=B*dblillumination;
if(R>255)
R=255;
if(R<0)
R=0;
if(G>255)
G=255;
if(G<0)
G=0;
if(B>255)
B=255;
if(B<0)
B=0;
dcMem.SetPixel(i,j,RGB(R,G,B));
}
}
pDC->SetStretchBltMode(HALFTONE);
pDC->StretchBlt(rcSample.left,rcSample.top,rcSample.right-rcSample.left,rcSample.bottom - rcSample.top,&dcMem,0,0,bm.bmWidth,bm.bmHeight,SRCCOPY);
dcMem.SelectObject((HBITMAP)hOldBitmap);
bmpSample.DeleteObject();
dcMem.DeleteDC();
As I need to Perform the same Operation 16 times in my OnPaint() to view the picture 16 times in 4x4 row matrix its becoming very slow.I could see each row painting and its taking around 3 secs .
Each time the Operation is Performed only these values dblSampleRGB[0],dblSampleRGB[1],dblSampleRGB[2] in code logic vary.
I want the whole OnPaint Operation to be Performed Instantaneously. So any suggetions to Optimize my code would be helpful.
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|
|
narayanagvs wrote: So any suggetions to Optimize my code would be helpful.
I haven't gone through your code but I would like to suggest a memory bitmap.
Write a dedicated class called CMemDc and ask it to do the stuff for you. Search google with "Memory DC VC++".
Directly doing the drawing into this dc and dumping the drawing will help in reducing flicker. Saving this drawing will help further. But you will have to take care of other things.
These are some quick suggestions.
|
|
|
|
|
Using GetPixel and SetPixel is SLOW! Every call needs to calculate the offset into the pixel
data.
I would start with a DIBSection - an HBITMAP that can be selected into a DC but you can directly
access the pixel data using a pointer.
See CreateDIBSection[^]
The CImage class can help wrap the DIBsection since you're using MFC.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hi All,
In my application i need to identify the drives available in my PC and the type(Ex: USB Floppy / Removable Disk etc -- The same way as shown in "MyComputer")
But while using the "GetDriveType" API, it returns only the type as DRIVE_UNKNOWN / DRIVE_REMOVABLE etc., But here i should know whether its a USB floppy or a removable one. Can anyone of you help me?
Thanks in advance.
Thanks & Rgds,
Sri..
|
|
|
|
|
Hi,
Hope this helps ...
Take the following into consideration, and then have a look a the function _getdrive() on MSDN.
curdrive = _getdrive();
for( drive = 1; drive <= 26; drive++ )
{
if( curdrive == drive )
{
sprintf(lpdrive, "%c:\\", drive + 'A' - 1 );
sprintf(szDirPath,"%s",lpdrive);
CreateDirectory(szDirPath, NULL);
}
}
Regards,
-- modified at 5:53 Tuesday 27th March, 2007
Sorry didn't read the whole question ... thus my answer won't help, seeing that you want the physical name.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
"QueryDosDevice" API shall be used for getting the deivce path name. And after that we can search for the string "floppy" in the return string of QueryDosDevice.
Thanks & Rgds,
Sri..
|
|
|
|
|
PSrividya wrote: Can anyone of you help me?
Lots of information here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
what is the difference bet these throw.
void Fun() throw();
void Fun() throw()=0;
void Fun() throw(bad_alloc)=0;
<\pre>
<div class="ForumSig">VIBIN
"Fool's run away,where angle's fear to tread"</div>
|
|
|
|
|
vibindia wrote: void Fun() throw(); //can throw any exception,I think
Yes.
See Steve's reply for this.
vibindia wrote: void Fun() throw()=0;void Fun() throw(bad_alloc)=0;
I guess, there should be virtual specifier mentioned.
These are pure virtual functions(assuming virtual specifier).
-- modified at 1:56 Tuesday 27th March, 2007
-- modified at 2:01 Tuesday 27th March, 2007
|
|
|
|
|
prasad_som wrote: vibindia wrote: void Fun() throw(); //can throw any exception,I think
Yes
This actually means that the function does ***NOT*** throw any exceptions. On a compiler that supports exception specifications if the function does try to throw one std::unexpected is called which usually terminates the program.
Steve
|
|
|
|
|
Thanks for correction !
|
|
|
|
|
ya now i got it. They are having virtual keyword.(pure virtual function>
i was confused with that throw() in betweeen
virtual void Fun() throw();
virtual void Fun() throw()=0;
virtual void Fun() throw(bad_alloc)=0;
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
|
See here[^] for the details on exception specifications.
|
|
|
|
|
Hi
All
I want to use Dialog as MessageBox in my project, so i want to load error icon,exclamation mark icons on my dialogBox. I want to do this at run time so how can i do it?
Thanks in Advance
Atul
Atul
|
|
|
|
|
If you wanted these icons in message box, then you can mention it while displaying message box only.
e.g.
AfxMessageBox(_T("Error message"),MB_ICONERROR);
AfxMessageBox(_T("Error message"),MB_ICONEXCLAMATION); In other places see following methods.
M. Atul wrote: i want to load error icon
Use IDI_ERROR .
M. Atul wrote: exclamation mark icons on my dialogBox.
Use IDI_EXCLAMATION .
Use LoadIcon[^] and SetIcon to load these predefined icons.
|
|
|
|
|
Thanks
Prasad
But i want to Load it at run time, in which event of DialogBox i have to write code. plz explain some more code.
Atul
|
|
|
|
|
M. Atul wrote: But i want to Load it at run time, in which event of DialogBox i have to write code.
As explained earlier, AfxMessageBox should suffice you if you are not doing any customization with it.
Otherwise, Override OnInitDialog to look it something similar to,
BOOL CMyDlg::OnInitDialog()
{
...
SetIcon(LoadIcon(NULL,MAKEINTRESOURCE(IDI_ERROR)),FALSE);
return TRUE;
}
|
|
|
|