Hello. Does someone have a simple sample for flood filling for a picture, or even better a sample of how to count the pixels instead. What I want is to count the pixels with the same color that touch eachother. I saw some flood filling you could rewrite, but those are very complicated so a simple sample for that would also be great. Hope you can help.
User 4414712
Posts
-
Flood counting pixels (Counting pixels instead of filling with a color) -
More proxies in IE browser applicationsHey. I am having a application that uses a IE webbrowser control. I know how to set a proxy overall for IE, but is there some way I can use a different proxy from each application with the webbrowser, that I have open ? Or is there are smarter webbrowser control that can handle more proxies than just one?
-
Automatic webbrowsing gives "object reference not set to an instance of an object"Yes I just need the entire source code, from the page the webclient browser is showing in the application.. I did this now, maybe that helps? if (webBrowser1 == null) { write2log("Webbrowser object null error"); Wait(6000); waitLoading(); } if (webBrowser1.Document == null) { write2log("Webbrowser object null error 1"); Wait(6000); waitLoading(); } if (webBrowser1.Document.Window == null) { write2log("Webbrowser object null error 2"); Wait(6000); waitLoading(); } if (webBrowser1.Document.Window.Frames[2] == null) { write2log("Webbrowser object null error 3"); Wait(6000); waitLoading(); } if (webBrowser1.Document.Window.Frames[2].Document.Body.InnerHtml == null) { write2log("Webbrowser object null error 4"); Wait(6000); waitLoading(); }
-
Automatic webbrowsing gives "object reference not set to an instance of an object"Okay, so split it up in seperate variables, and afterwards check them for null? so example: if (webBrowser1 == null) { myLabel.Text = "Webbrowser is null"; } And do that with all the objects i use for getting the source ?
-
Automatic webbrowsing gives "object reference not set to an instance of an object"Hello. I have a application, that does automative navigating of a webbrowser object.. I just often get the error: "object reference not set to an instance of an object" when the application is trying to get the html source or the lenght of a site, with this code: if (webBrowser1.Document.Window.Frames[2].Document.Body.InnerHtml.Length < 5) { return true; } Even though I have functions that waits for the site to load done before continue it often occurs if the internet are a bit slow.. Is there anyway I can check if the object reference is set, or another way to solve this? Hope there is help to find :)
-
Check if web-frame in webclient is done loadingHello. I have a application with a webclient. In that webclient I am loading a homepage with about 5 frames, but one of the frames are refreshing constantly each 30second. That gives me problem when I want to use the source from another frame - because when I use IsBusy and it is refreshing the frame with constantly refreshing while I am navigating another frame, does the application think that frame is done navigating too, and then I of course get an error. It happens very often, and stops the whole program. So is there any way only to check one frame if it is done loading ? Hope your guys can help me out.
-
Check if frame in webclient is done loadingHello. I have a application with a webclient. In that webclient I am loading a homepage with about 5 frames, but one of the frames are refreshing constantly each 30second. That gives me problem when I want to use the source from another frame - because when I use IsBusy and it is refreshing the frame with constantly refreshing while I am navigating another frame, does the application think that frame is done navigating too, and then I of course get an error. It happens very often, and stops the whole program. So is there any way only to check one frame if it is done loading ? Hope your guys can help me out.
-
WebClient.UploadFile won't upload the file.And the output from the upload site is that "File name cannot be empty"..
-
WebClient.UploadFile won't upload the file.And yes, the upload form is a POST method :)
-
WebClient.UploadFile won't upload the file.Hello. Im having a php post site on my server where i can upload files. The problem is just that it doest upload the file at all. Im trying through the php script to upload a file to the database. It works fine when i do it manually from the site, but not when im using UploadFile(). My C# code looks like: string file = "1.jpg"; string url = "http://myserver.net/ind.php?userid="+\_userid+""; try { WebClient InsertClient = new WebClient(); byte[] Response = InsertClient.UploadFile(url, "POST", file); label1.Text = Response.Length.ToString(); } catch (Exception ex) { label1.Text = ex.ToString(); } And the uploadsite looks like and is called "ind.php": $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; $fp = fopen($tmpName, 'r'); $content = fread($fp, filesize($tmpName)); $content = addslashes($content); fclose($fp); if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); } include "dbcon.php"; $query = "INSERT INTO files (userid, imageData ) ". "VALUES ('".$_GET['userid']."', '$content')"; mysql_query($query) or die('Error, query failed'); echo "
File $fileName uploaded
"; It only adds the userid to the database but without any content of the file. Have anyone got this problem before? -
Sending byte array(data) to a URL with POST or GETYeah, that kind of upload I have :) The question is more like, how can I write a C# application that postes a file to that php script?
-
Sending byte array(data) to a URL with POST or GETHaven't really created the PHP script yet. I'm not having any specific idea how to do it. I'm looking for an idea and some help how to fix it. But yes, a post to the site will be as useful as a GET. I'm looking and searching for ideas. Google didn't help me very much this time :)
-
Sending byte array(data) to a URL with POST or GETHello. Im having a picture on my computer etc named "Hello.jpg", and I want to send it to a homepage etc http://mysite.com/image.php which then saves it to a blob columm in a database. I tried to do a simple GET with the byte array that contains the picture, but of course it doesn't save the whole image just with http://mysite.com/image.php?image=bytearray How can I solve this problem? Thx
-
Webbrowser module with proxyHello. Im having a program that surf between some sites automatic. It is being done with a webbrowser module. Is it now possible for me to make that webbrowser browse through a proxy? I can see that WebClient and HttpWebRequest supports proxy browsing, but can't see anything with the webbrowser module. Anyone who knows that ?
-
Setup a remote MySQL databaseI use windows for hosting mysql.. I have tried look in my.ini for these bind-adress and the other configs.. But can't find anything at all in my.ini that seems to have something to do with TCP/IP configuration.
-
Setup a remote MySQL databaseI installed it together with wamp. And can't find such just thing in the mysql.ini .. What do I have to change in the mysql.ini to enable TCP/IP connections ?
-
Setup a remote MySQL databaseHello. Im running a webserver with apache and mysql 5.xx Now I want to connect to the MySQL database on a server outside my own. But it doesnt allow remote connections from my mysql database. I have port 3306 open and the firewall off. How can I setup MySQL to accept remote connection? Best Regard Mads
-
Get whole content of a frame source from webbrowserOff couse.. I could have said that myself.. Thanks alot!
-
Get whole content of a frame source from webbrowserHello. I have this: this.webBrowser1.Document.Window.Frames[2].Document.Body; Which gives me the HTML source of the main body of the frame. But I need the source of the whole site, including HEAD and all the other tags. Hope your guys can help :)
-
How can I push a button virtual?That works fine with SendKey, but it just requires that focus is on the application.. Which it isnt all the time.. Else it just does a Enter push while i am in another program.. Can I do so it does the ENTER in my application, and not in my current open program?