|
ah! insight!
I never quite made the distinction.
Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Attached below is the program... but it fails to execute!!
When i tried to execute: Cimg0Exception window pop up with the msg: CImg<unsined char="">::load_other():Failed to open image 'piggy.jpg". Check you have either the ImageMagick or GraphicsMagick package installed.
How do i install??(mine is Windows XP)
#include "CImg.h"
using namespace cimg_library;
int main() {
CImg<unsigned char=""> image("piggy.jpg"), visu(500,400,1,3,0);
const unsigned char red[] = { 255,0,0 }, green[] = { 0,255,0 }, blue[] = { 0,0,255 };
image.blur(2.5);
CImgDisplay main_disp(image,"Click a point"), draw_disp(visu,"Intensity profile");
while (!main_disp.is_closed && !draw_disp.is_closed) {
main_disp.wait();
if (main_disp.button && main_disp.mouse_y>=0) {
const int y = main_disp.mouse_y;
visu.fill(0).draw_graph(image.get_crop(0,y,0,0,image.dimx()-1,y,0,0),red,0,256,0);
visu.draw_graph(image.get_crop(0,y,0,1,image.dimx()-1,y,0,1),green,0,256,0);
visu.draw_graph(image.get_crop(0,y,0,2,image.dimx()-1,y,0,2),blue,0,256,0).display(draw_disp);
}
}
return 0;
}
|
|
|
|
|
purplee85 wrote: How do i install??(mine is Windows XP)
Please don't repost your questions. You can modify your original post to add the code. Of course in this case the code is irrelevant since you already told us you don't know how to install the library.
|
|
|
|
|
purplee85 wrote: CImg image("piggy.jpg"), visu(500,400,1,3,0);
Is it an absolute vs. relative path issue?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
purplee85 wrote: "Failed to open image 'piggy.jpg". Check you have either the ImageMagick or GraphicsMagick package installed."
How do i install??(mine is Windows XP)
Which part of
The Windows version of ImageMagick is self-installing. Simply click on the appropriate version below
and it will launch itself and ask you a few installation questions. is it you need help with?
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hi.
I'm developing a library, and a function must display a form window with some controls. This form must be created based in a specification already written in some kind of file. I though in XML.
My question is, there is something already written that handle this kind of stuff? or I should start to warm my fingers and parse the XML file by my self?
Thank you and kind regards.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
We are in the process of converting the Database of a, very large and process intensive, 14 yr old C++ MFC (V6) app from using MFC/DAO and MSJet to MS SQL Server. We want to do this in a way that will not loose any perfromance. In addition after this interim release is completed we will be re-writing and migrating the whole thing to .NET using a combination of C#/Managed C++.
My question is... What is the best way of accessing the SQL Db that has the best performance and will not set back development time too much and will also allow the data classes to be easily migrated to .NET. Should we use ADO, OLE DB etc ? I've heard ADO has performance issues and OLE DB is difficult to work with. I've looked into "Express OLE DB" but the download links to Sypram all seem to be broken and all email to the company is bouncing back.
Any suggestions would be appreciated.
Thanks
Steve Jacovino
ConEst Software Systems
|
|
|
|
|
Stevej wrote: In addition after this interim release is completed we will be re-writing and migrating the whole thing to .NET using a combination of C#/Managed C++.
Is there some requirement for migrating this twice?
Stevej wrote: My question is... What is the best way of accessing the SQL Db that has the best performance and will not set back development time too much and will also allow the data classes to be easily migrated to .NET.
1) What if you have competing criteria in there? Don't you think you need to prioritize?
2) What does "will not set back development time too much" mean? Set back how? Define "too much".
3) What does "easily migrated to .NET" mean, define "easily"?
I suggest you need to elevate the quality of your requirements before moving into making decisions.
|
|
|
|
|
Sorry, I guess it does sound like we are looking for the Grail.
Forget the other stuff, performance tops the list by a wide margin. Years ago a Microsoft engineer told us that Jet was their fastest database engine. Now we are looking for the best way (i.e. in terms of performance) to replace the DAO/Jet with MS SQL, still using VC++. We are looking for all the speed we can get while keeping with MS SQL.
Thanks
|
|
|
|
|
Stevej wrote: I guess it does sound like we are looking for the Grail.
Oh I wish I had thought of that!
Stevej wrote: performance tops the list by a wide margin.
Ok but you said you are migrating to SQL Server... from what? Access? If so you are likely to see a significant performance difference based soley on the DB engine completely exclusive of your DAL methods.
Also...
Stevej wrote: I've heard ADO has performance issues
I don't know about that but you might consider that ADO is designed to be used also from things like VB. When you use it from C++ you can use #import to generate ATL code that accesses the custom C++ ADO interfaces. This might out perform the automation interface used from VB by a significant amount.
Also check this out[^]
Last modified: 27mins after originally posted -- added MSDN article link
|
|
|
|
|
ADO is a layer on OLE DB. Unless you enjoy pain, I would not recommend programming the OLE DB directly. I'd be very surprised if there were any significant differences between ADO and OLE DB. Any real application is likely going to need the services ADO offers, and if you use OLE DB directly, you'll just end up reproducing many of those services yourself.
I've not done any performance testing, but I've seen all sorts of performance claims from all the technologies. It also depends strongly on the database one is connecting to: it has to be optimized for the connection technology. I believe IBM (DB2) recommends OLE DB, while Oracle gets better performance from ODBC (but don't quote me on that: I might be wrong). see http://www.datadirect.com/products/odbc/raisestd/index.ssp#1[^] for discussion of performance on one product.
Microsoft of course is going to push their latest technology, ADO.NET (I guess, unless they've changed it yet again; very frustrating to try to keep up with their constantly moving targets). Since they write the connection layers, they also optimize their database to talk to that layer. If performance is ultimate, stick with the latest Microsoft technology (and plan to spend $$$ upgrading it constantly). If you want portability, ODBC is probably king, and apparently pretty decent performance. ADO can also talk to ODBC but thru a layer, and maybe some performace hit.
david
|
|
|
|
|
When we right click on WinXP desktop and try to change display properties, we can change windows and buttons style to "Windows XP Style" ... and it makes a bunch of changes to the registry.
I want to know if its possible to make that property change through VC++ code ?
-Cage
|
|
|
|
|
cagespear wrote: I want to know if its possible to make that property change through VC++ code ?
Yes, it's possible. Just use the registry functions.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I am looking for some examples or advice of really good data parsers. I am using a windows application and pulling data in via RS-232 ports. The data is typically one byte at a time and is complete data. It will have a header, a command, data, checksum, etc. I am looking for some smart parsers. I have some parsers that work, but I would like to make them more full proof.
Does anyone have any advice of ways to make sure it stays smart or places to find examples of parsers? For example, I had a parser that pulled two bytes of data in at a time. It worked well except for if the system was turned on at an odd byte. If the header was supposed to be in the higher byte, but was now in the lower byte, I had an issue. This problem has been fixed, but I want to see what other people have come across. Thanks for the help.
|
|
|
|
|
epsilonorion wrote: I am looking for some examples or advice of really good data parsers.
Short of writing something in an abstract way using, say, something like lexx/bison like the compiler-guys do (which is clearly overhead for your application), I can only imagine your way of distinct parsers.
Yes, working parsers are a valuable asset.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hi all,
I tried to configure my C++ so that i could use OpenCV but i found that there are no option for me to configure MFC library as a statically linked library.
By the way does anyone have any idea how i could install ImageMagicK or GraphicsMagicK(I have unzipped the necessary folder but stumped when it comes to installation because i do not understand the installation procedures provided in the web!!
With regards,
Jas
|
|
|
|
|
purplee85 wrote: found that there are no option for me to configure MFC library as a statically linked library.
The option "Use MFC in a Static Library" located in Project Properties => General => Use of MFC doesn't qualify? That is for VS2005, but the option exists somewhere in the "general" properties of all versions
Judy
|
|
|
|
|
Hello fellow developers,
I'm using the serial communication library described in the article:
Serial library for C++
The problem is that I have a customer where the serial port COM1 reports to be in use (ERROR_ACCESS_DENIED) when I try to open the port (CreateFile) after a computer restart. I have tried to find out which program that use the port by searching for \Device\Serial in Process Explorer and Handle by Sysinternals. But with no success. The handle seems to be in use but no process wants to admit it. The customer has to restart the system several times before the serial port can be accessed again. So I am wondering if there are additional methods to find who use a specific COM port or if anyone can shed more light on this problem of mine.
The COM port used is the one placed on the motherboard of a Intel D945GNT motherboard. The system has 2 addtional COM ports on a PCI-express card, these are used without any problem. The system has had a LAN to COM port driver, Lantronix, installed earlier. The system is running Windows XP SP2.
Best regards,
Erik
|
|
|
|
|
It may be that no userland processes are using COM1. Perhaps a hardware device such as touchscreen driver or Ethernet to COM have exclusive access to the port.
-David Delaune
|
|
|
|
|
I am adding new fields to the summary information for a file in this application I am working and I want to know if I can create a property identifier for the UserDefinedProperties? For example, already existing is
// Summary Information
PID_TITLE = 2;
//DocumentSummaryInformation
I was thinking I should add a field similar to PIDDSI_CATEGORY for UserDefined, which has a property identifier value of 0x00000002, but I do not know how?
|
|
|
|
|
You should review this[^] MSDN article, where it states :
The UserDefined property set can be used to hold any properties. Typically, it is used to store named properties created by a user.
|
|
|
|
|
Hi All,
I'm using Visual Studio 2003, and MFC/C++.
I want to simulate just the update/refresh portion of the maximize command, on an ie window. I've already managed to connect to the window and can send minimize and maximize commands to it, as well as move the window around the screen, even hide and show the window if I wish to. I just need to know what message or function I have to pass to that window to get it to do JUST the refresh portion of its maximize command.
Here's some background info and stuff I've already tried:
I have an internet page, that uses java applets served from a server I have no control over. The internet page loads, but none of the background graphics, or button graphics load, so you pretty much have to click on a blank screen and "guess" where the buttons are.
However, if you minimize the window, and maximize (tested over 100 times, by multiple people, under different conditions, with a 100% success ratio), it'll redraw the window properly.
I've tried simulating a very rapid alt+tab and it restored the buttons graphics but not the main graphic (not acceptable to my client). I've also tried the following commands:
::RedrawWindow(hWnd,0,0,RDW_INVALIDATE);
::RedrawWindow(hWnd,0,0,0);
::UpdateWindow(hWnd);
::SetFocus(hWnd);
Any help here would be greatly appreciated.
Thanks,
Brian
|
|
|
|
|
|
Hi
I used RichEdit ctrl with "RICHEDIT20W" for unicode support.
When FindText or FindTextW is called, its getting Failed.
Please could you tell the procedure for utilizing the FindText method
Regards,
nag.
|
|
|
|
|