|
Hello Krishna!
Sounds like a JavaScript issue so please post this question in the correct forum: "JavaScript".
It's there. I know, I've been there before .
Plus to make it easier for us to help you:
1. Reproduce the exact error message. A screeshot would be nice.
2. Give a small concise example that will enable us to reproduce that error.
Tanks,
Manfred
|
|
|
|
|
hello i am using visual studio, C# to create filter.
System.Drawing.Bitmap image = (Bitmap)Bitmap.FromFile("C:\\Users\\Pictures\\sample1.jpg");<br />
<br />
pictureBox1.Image = image;<br />
<br />
AForge.Imaging.Image.FormatImage( ref image );<br />
<br />
PointedColorFloodFill filter = new PointedColorFloodFill();<br />
filter.Tolerance = Color.FromArgb(150, 92, 92);<br />
filter.FillColor = Color.FromArgb(255, 255, 255);<br />
filter.StartingPoint = new IntPoint(150, 100);<br />
filter.ApplyInPlace(image);
however when i try to run, an error occurred, needing help!
the error is " Source pixel format is not supported by the filter."
|
|
|
|
|
The error tells you what the problem is. The PixelFormat of your image is not supported by the filter. Check the documentation to see what formats are supported and then check your code to see what the PixelFormat of the image is. In the case of the PointedColorFloodFill, it supports 8 bpp grayscale and 24 bpp colour images. If the PixelFormat of your image is 32 bpp, then you can clone it to 24 bpp and it should work OK.
Three points here:
1. The error was very specific, a quick google would have identified the cause in 20 seconds or so.
2. You need to read the documentation.
3. As this was a problem with a third party, you should have asked there first.
|
|
|
|
|
thank you for your reply. i got it.
|
|
|
|
|
HI All,
I want to know how create a TLS connection for jabber protocol using standard dotnet frame work. Thanks
|
|
|
|
|
Take a look here[^].
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
So I have been trying to take a screenshot with a windows service... don't think I really have to say I haven't been successful. I think it is because of new security features with Windows 7 that does not allow it to interact with a users session in that way?
I have tried using the built in functions for .NET and this code:
http://www.codeproject.com/Messages/1705493/how-to-take-a-screenShot-using-windows-service.aspx[^]
They just take a black screen. I have also tried setting the service to interact with desktop (still black pic).
Now is there is way I can make a service take a screen shot? Also if I can't.. do you think I might be able to make the service start a process (exe I create) that takes a screen shot and saves the file, then teh service grabs that file? I haven't tested it, but was wondering if that would be possible. Wouldn't running the process make it run under console and be able to take a screenshot?
First I would like the service to do it, but the process idea is a plan B if that would even work.
|
|
|
|
|
Jacob D Dixon wrote: I think it is because of new security features with Windows 7
There is a reason for that, think about it do you want the ability for a service to be able to take a picture of your phone. While I cannot think of a valid reason for this, I can think of plenty of malicious reason to attempt to get a snapshot of a users screen.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Well I assure you it isn't for malicious reasons. I'm working on a personal project that monitors computers to get updated information such as hardware info, software, processes, etc. We actually use a software now called LabTech (labtechsoft.com) and I noticed it took screen shots of people's machines (that have the agent installed). I was trying to duplicate that.
|
|
|
|
|
You can write a conosle app that takes the screen shot, and run that app from the service.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Thanks John. I will give that a try to see how it works out.
|
|
|
|
|
This is becouse of Session 0 isolation[^] in Windows Vista and Windows 7. I have made no test about it, but I think that any application opened from a service in Session 0 will also be in Session 0, so you'd get the same result.
|
|
|
|
|
Ahh crap you are right. Did a test:
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in System.Drawing.Dll
Additonal Information: The handle is invalid
|
|
|
|
|
I'm parsing IMDb.com pages for movie information and I've come across a problem which I'm not sure how to tackle.
The movie pages of IMDb.com displays the movie titles in your own language and this is my problem - I get titles containing the characters åäöÅÄÖ and they look funny.
A movie called "Som hund och katt: Kitty Galores hämnd" looks like this in the web page source "Som hund och katt: Kitty Galores hämnd" (http://www.imdb.com/title/tt1287468/).
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
I suck at encodings
How to I convert these texts I get from this page so that they look OK in a TextBox control?
|
|
|
|
|
how are you getting the content of such pages? what does your code look like? what are you doing about encoding?
|
|
|
|
|
Problem solved, HttpUtility.HtmlDecode(text)
|
|
|
|
|
You are most likely violating various copyright laws with what you are doing. If you want access to IMDB content you should probably look at the content licensing which starts at $15k per year.
|
|
|
|
|
Actually I don't think they care and honestly I don't care. What I'm doing is grabbing some info from IMDb.com, storing it in a text file that my hardware media player can show when selecting movies. It's nice to see title, plot and rating when choosing what to watch and not just the filename.
|
|
|
|
|
If it is just for a little home project, then I would suggest Gracenote[^] they have licenses for non-commercial use that can get you access to their MusicID and VideoID APIs. That is what the SONY DVD MegaChanger I just bought uses.
|
|
|
|
|
Thanks for the tip - I'll definitely look into that!
|
|
|
|
|
Hello,
I'm using WMI:
ManagementObjectSearcher Search = new ManagementObjectSearcher("Select * From Win32_ComputerSystem");
foreach (ManagementObject Mobject in Search.Get())
{
double Ram_Bytes = (Convert.ToDouble(Mobject["TotalPhysicalMemory"]));
}
and everything is ok, BUT I've 4gb physical installed on my machine, the os uses only 3gb, therefore the amount of ram i get after the code executed is 3gb and not 4...
is there any way to get physical amount and not os usage amount ?
Thanks
|
|
|
|
|
If you read the documentation on the Win32_ComputerSystem[^] class, at the bottom, under the TotalPhysicalMemory property description, you'll see this and the answer to your problem:
TotalPhysicalMemory
Data type: uint64
Access type: Read-only
Qualifiers: Units (Bytes)
Total size of physical memory. Be aware that, under some circumstances, this property may not return an accurate value for the physical memory. For example, it is not accurate if the BIOS is using some of the physical memory. For an accurate value, use the Capacity property in Win32_PhysicalMemory instead.
|
|
|
|
|
Ok,
I tried with "Capacity" as follows :
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMemory");
foreach (ManagementObject mo in searcher.Get())
{
ulong ans;
ulong.TryParse(mo["Capacity"].ToString(), out ans);
}
after execution i get ans = 2147483648 byte --> 2gb where did those 2 gb come from ?
as i already wrote, my os uses 3gb, but i have 4gb physically installed...
What I mean to
|
|
|
|
|
long ago the Win32 function GlobalMemoryStatus was limited to 2GB; that is why GlobalMemoryStatusEx got introduced.
I'm afraid WMI is still either using GlobalMemoryStatus or having similar trouble.
|
|
|
|
|
Actually, it works fine. Win32_PhysicalMemory returns an object for each memory module, not just one for the entire total.
|
|
|
|