|
If you know the byte-pattern (e.g., colors, palettes) that the image is comprised of, I don't see why not.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I think he didn't mean an easy computer-generated bitmap. Image detection is not easy. There are very complicated math algorithms about that. I've read a book about that.. although it has been a long time ago I think there was a way doing it by using the FFT algorithm in a special way, but I'm not sure about that anymore. You could google for "digital image processing".
Don't try it, just do it!
|
|
|
|
|
I need help. I want to extract the ISO file to the local harddrive. Is there an sample code or some sample written in VC++ 6.0 or C#, which I can take a look. Please help.
Thank You
Regards,
ntuyen01
|
|
|
|
|
ntuyen01 wrote:
...the ISO file...
Ok, get me up to speed here. What is the ISO file?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
What is the iso file?
Bun of files compress to a single file to make the CD image.
Example: testing.iso
If someone gave me an testing.iso from the CD want to extract it out to the local disk.
Thank You
Regards,
ntuyen01
|
|
|
|
|
Does knowing the format of an ISO file help?
http://www.wotsit.org/download.asp?f=iso9660
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The format of an ISO is iso9660
Thanks
Thank You
Regards,
ntuyen01
|
|
|
|
|
Right. Did I indicate otherwise?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Would you please tell me what do you mean?
Thank You
Regards,
ntuyen01
|
|
|
|
|
You wanted to know how to extract the contents of an ISO file. I simply provided you with a link to the ISO file format. Usually when one knows the format of a file, they can start to put code together that will operate on said file.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Why that difficult? Code an easy CD emulator (that is a thing of lets say 2 hours) and use the windows file system driver (cdfs) for mounting the image and reading it via the normal file management API.
Don't try it, just do it!
|
|
|
|
|
If that'll work, great! I've never dealt with CD-type files so I was just taking a SWAG.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
well you can look at linux and *BSD source code to see how they read it from CDs. C, but might be useful. I don't know if it is easier to start from scratch or not, but you might try write a wrapper for their code.
http://www.freebsd.org/
|
|
|
|
|
What do I need to look at the http://www.freebsd.org/?
Thank You
Regards,
ntuyen01
|
|
|
|
|
|
I'm writing a program which needs to get the mouse capture in order to be able to select a part of the screen. I've tried this using GetCapture, but that doesn't work, because at the moment I start dragging at a point that is not in the my app's window, the capture is lost and the window at that point is activated.
Is there some way to prevent this loss of capture AND focus?
|
|
|
|
|
I'm trying to set up a function which sorts the 10 elements of my array utilizing pointers. It's just a learning exercise for my C++ class. Can anyone explain why the following code only makes 1 iteration and how I can get it to keep moving?
void sort(int iArr[], int size)
{
int *iPtr = iArr;
for (int i = size-1;i>0;--i)
for (int j=0; j<i; ++j)
="" if="" (*iptr=""> *iPtr+1);
{
int temp = *(iPtr);
*(iPtr) = *(iPtr+1);
*(iPtr + 1) = temp;
}
}
|
|
|
|
|
Anonymous wrote:
for (int j=0; j if (*iPtr > *iPtr+1);
do you mean:
for (int j=0; j if (*iPtr > *(iPtr+1));
?
also, don't you need to move the pointer somewhere? looks like iPtr is always pointing at the first element of the array.
Software | Cleek
|
|
|
|
|
It seems as though no matter where I put the code to increment iPtr, I still only get one iteration. Seems like this should be so simple, but no matter what I do I can't get it to work. The assignment was to take a previous assignment and write it so that the print & sort funtions are handled with pointers instead of arrays. Can you give me advice as to where in the code that I wrote I would insert the increment? Yes, I'm a newbee. I took structural C 4 years ago and I'm afraid I've lost a lot in 4 years.
|
|
|
|
|
it's kindof hard to tell what's going on with your code, since the board reformatted it a bit.
try reposting it inside <pre>...</pre> tags, and put spaces after any < signs (like in your for loops and in the if(...). that should keep the board from doing too much damage.
Software | Cleek
|
|
|
|
|
Thanks for your help. At this point my class is in 3 hours, so I'm going to just get the teacher to help me out. I think part of the problem is that I'm basing this portion of code on the original program which didn't utilize pointers, and I'm getting very confused. Your time is much appreciated. This is a great board. Take Care,
Dawn
|
|
|
|
|
Anonymous wrote:
Can anyone explain why the following code only makes 1 iteration...
What is the value of size ? If it is 2, then the outer loop would only execute one time.
There are other reasons why this routine will not produce the desired result but we'll get to those once the loop issue is resolved.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
When I wrote this little program below, I didn't even define the value of size, and it executes with the desired results. I get one print out of the array, and the second time the print function executes the list is sorted. When I try to employ this same logic using pointers, the sort loop only makes one iteration:
#include <iostream>
using namespace std;
void Print (int [], int);
void Sort (int [], int);
void main()
{
const int max =10;
int list [max] = {7, 4, 9, 1, 8,
3, 6, 5, 0, 2};
Print (list,max);
Sort (list, max);
Print (list, max);
}
void Print (int array [], int size)
{
for (int i=0; i<size; i++)
cout="" <<="" array="" [i]="" "="" ";
cout="" endl;
}
void="" sort="" (int="" [],="" int="" size)
{
for="" i="size-1;i">0;--i)
for (int j=0; j<i; ++j)
if="" (array="" [j]=""> array [j+1])
{
int temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
}
}
This programs works beautifully.
|
|
|
|
|
Dawners wrote:
I didn't even define the value of size...
Actually you did. It had a value of 10.
When switching from array[] to pointers, keep in mind that array[j] is equivalent to *(array + j) .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How are you coming along with this?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|