|
Please pardon me if this is the incorrect place to be posting this question:
I'm trying to use the Canon Software Development Kit (EDSDK v1.3 to be exact) to include support for Canon RAW images in my application written with C# in Visual Studio .Net 2005. So far I've met with some success, but seem to have hit the proverbial wall. I'm able to use the Canon libraries to connect to the RAW (CR2) image files, access the image properties, etc, but am currently unable to display the image on screen. I'm hoping someone out there has already run across (and hopefully already solved!) this problem, or something similar and might be able to lend me some advice.
BTW, the SKD libraries are freely available from Canon (after you go through the trivial approval process) here: http://www.usa.canon.com:80/consumer/controller?act=SDKHomePageAct&keycode=Sdk_Lic&fcategoryid=325&modelid=9808&id=3464[^]
Any help? Am I barking up the wrong tree?
Thanks!
|
|
|
|
|
I've never worked with the RAW SDK ( it returns raw bitmap data as opposed to JPEG, right ? ), but for the other SDK, I had to write a wrapper, which passes a delegate in C++/CLI to provide the function pointer to pass the HWND to.
Christian Graus - C++ MVP
|
|
|
|
|
Christian,
As best I can determine, the SDK does return raw bitmap data in one form or another. The latest version of the SDK does come with a C# wrapper around the dlls which contain the actual SDK, but unfortunately no C# sample code on how and what to call to get the image information to display. What I've been able to decipher so far is from an included C++ sample application which I've muddled through, but I'm not a C++ developer, so that's been an iffy proposition!
The included C# wrapper around the dll's allows the functions to be called from C#, but as best I can figure the function call which actually returns the image returns a pointer the a memory stream containing the image. Muddling through the included C++ example, that 'stream' gets re-arranged slightly to build the actual image. It's at that point that I'm stuck. I can see what the C++ function is doing, but haven't a clue how to write the C# equivalent. Canon unfortunately offers no support, so they're of no help. I'm hoping someone may have already figured out the solution.
|
|
|
|
|
f1nut wrote: The latest version of the SDK does come with a C# wrapper around the dlls which contain the actual SDK, but unfortunately no C# sample code on how and what to call to get the image information to display.
Really ? This is the one that has JUST been released ? Do you know if the other SDK has a RAW wrapper ? That's awesome news, I've been working on a wrapper for the latest SDK for a while now.
If the stream represents the image data, you could look at my image processing articles on how to pass the bits into a bitmap.
Christian Graus - C++ MVP
|
|
|
|
|
Yes, there is a C# wrapper to the dll's in the latest sdk from Canon. At least the EDSDK v1.3 has one.
|
|
|
|
|
I am a C# programmer with about 4 years development experience. I currently busy with an Equipment Management System. I want to add a Vehicle Tracking feature on the system. I have done a couple of searches on the net, but the results I get are not specific.
Can anyone plz tell me what Hardware and software I need to use GPS on my windows application.I would most propably appreciate a list of all hardware and software necessary for my application to work, and possibly a step-by-step guidelines.
Programming is not a skill, it's an art.
|
|
|
|
|
|
i am new in c# but i have a c# haw to program book, can any one help me to find the answers of this book plz
|
|
|
|
|
Book are generally used to hide information in, especially the kind of book you are talking about. So the answers are in the book, not somewhere else.
---
b { font-weight: normal; }
|
|
|
|
|
Your question makes totally no sense. It also beggars belief. Without telling us what the book is, what can we possibly tell you about it ?
If the book has questions and no answers, it's kind of useless. If it has source code listings and you want to download them, do a google.
Christian Graus - C++ MVP
|
|
|
|
|
first very thanks for your reply ,
it is a cool book but all questions in the end of chapter contains some very hard questions that can not be answer.
|
|
|
|
|
tamerana2004 wrote: it is a cool book
But you're still not telling me what book it is...
tamerana2004 wrote: but all questions in the end of chapter contains some very hard questions that can not be answer.
I'd give a 95% chance that the questions are designed to make you think about the chapter you read, and the answers are not listed because it's assumed you know them, because they are in the pages you just read.
Christian Graus - C++ MVP
|
|
|
|
|
very thanks for your reply but can u help me to answer some questions like that . or give me the idea
Create class SavingsAccount. Use static variable annualInterestRate to store the interest rate for all account holders. Each object of the class contains a
private instance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12; this interest should be added to savingsBalance. Provide a static method ModifyInterestRate that sets the annualInterestRate to a new value. Write a driver program to test class SavingsAccount. Instantiate two savingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 4%, then calculate the monthly interest and print the new balances for each of the savers. Then set the annualInterestRate to 5% and calculate the next month’s interest and print the new balances for each of the savers.
|
|
|
|
|
What is the book ? Can you do NONE of this ? If so, I suggest either the book is useless, or programming is just not for you.
Christian Graus - C++ MVP
|
|
|
|
|
Is there a method in the .NET framework that I can call to get the window with the current focus. All I've been able to find on the net is this:
// Return the handle of the window that has the focus.
[DllImport("user32.dll")]
public static extern IntPtr GetFocus();
This isn't built into System.Window.Forms?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
No, it is, by definition a PInvoke call to load a function out of user32.dll and call it.
Christian Graus - C++ MVP
|
|
|
|
|
Yeah, I just think it's strange that it's not built into the framework. Wonder what their reasoning was...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
Being relatively new to C#/.Net I am having problems finding a simple solution to the following scenario:
I have a table with many fields including FirstName, LastName, MemberID and EmailAddress. I need to display a checkedlistbox with all the FirstName + LastName's BUT I need to only pass the relative selected EmailAddress to another table. I don't want to show the EmailAddress in the checkedlistbox.
I can populate the listbox as well as retrieve the selections without problem but is there a way to "hide" the EmailAddress in the checkedlistbox but retrieve it when selected?
Thanks,
Glen Harvy
|
|
|
|
|
A listbox item has .Tag right? If so, store the e-mail address in the tag, item.Tag = "mmmm@bacon.com";
You can store pretty much anything in the tag, so when your populating the list, just put it in the tag for that item.
|
|
|
|
|
Thanks for that - I've used the tag for this purpose before but forgot it.
It doesn't seem possible however to ".Add.Tag" so I will need to bind the listbox to a dataset which is what I didn't want to do <sigh>.
Glen Harvy
|
|
|
|
|
Try this when your adding an item:
ListViewItem item = new ListViewItem(stuff);
item.Tag = whatever
|
|
|
|
|
Hi
i want to generate a word document by taking data from database (sql server). i don't know how can i do that. can someone suggest me the way to do that?
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi,
I made a calculator which calculates measurements. The application asks you for example "how much is 200 centimeters in meters".
Because these calculations could have broken numbers i am forced to use doubles.
But when i type the answer, it keeps saying its wrong.
Suppose an answer is 0,0009. But when i look in the array which holds all the answers i see 0,0009000000000000012.
How can i solve this?
Thanks in advance!
|
|
|
|
|
"Double" stores values in base-2 representation. Like you cannot exactly represented 1/3 in decimal notation, you cannot represent 1/10 in base-2 representation. That means you always have rounding errors when using double.
Never compare two floating point numbers for equality, but instead consider two numbers to be equal if Math.Abs(value1 - value2) < 0.00000000001.
Alternatively, you might use the type "decimal" which stores numbers in base-10 representation.
|
|
|
|
|
See
modified 12-Sep-18 21:01pm.
|
|
|
|