Search found 62 matches

by stevedee
Friday 16th March 2018 6:40pm
Forum: General
Topic: Individual color values of a pixel?
Replies: 8
Views: 356

Re: Individual color values of a pixel?

I think the problem with blue & red being switched is because Gambas thinks the format of my Gimp image is RGBA (which it reads low byte to high byte) where the hex value 0000ff is interpreted as red. But my Gimp image interprets this as blue (i.e. RRGGBB, high byte to low byte). See http://gambaswi...
by stevedee
Friday 16th March 2018 12:05pm
Forum: General
Topic: Individual color values of a pixel?
Replies: 8
Views: 356

Re: Individual color values of a pixel?

OK, Take 2. I created a new GUI project and added a button, a text box and 3 labels to the form. Public Sub btnGetData_Click() Dim hImage As Image Dim Pixels As Integer[] Dim intPixie As Integer hImage = Image.Load(txtImageFile.Text) 'the test image Pixels = hImage.Pixels intPixie = Pixels[1] Label1...
by stevedee
Friday 16th March 2018 9:48am
Forum: General
Topic: Individual color values of a pixel?
Replies: 8
Views: 356

Re: Individual color values of a pixel?

...how can I extract the integer value for each of the red, green and blue channels for that pixel? I think you need the gb.Image.Effect component, and basically do something like:- hImage = Image.Load(strFilePath) 'load photo hHisto = hImage.Histogram() For index = 0 To 255 lngRedPixel = hHisto[Im...
by stevedee
Monday 05th March 2018 8:18pm
Forum: General
Topic: Image manipulation
Replies: 7
Views: 269

Re: Image manipulation

...and here is an example using my code.

The following 2 images where time-lapse photos taken with my trail-cam:
image1.jpg
image1.jpg (106.84 KiB) Viewed 257 times
image2.jpg
image2.jpg (107.07 KiB) Viewed 257 times
...and here is the result...
image3.jpg
image3.jpg (7.36 KiB) Viewed 257 times
only unique pixels in image1 are reproduced in image3.
by stevedee
Monday 05th March 2018 8:05pm
Forum: General
Topic: Image manipulation
Replies: 7
Views: 269

Re: Image manipulation

Here is my very basic test code that seems to work. Create a new project, make sure component gb.Image is included. Add 2 textboxes and 1 button. Pre-load the text boxes with the paths of 2 equal sized images (I used jpegs). ImageSub.png The code:- Public Sub Button1_Click() Dim indexX As Integer Di...
by stevedee
Monday 05th March 2018 5:45pm
Forum: General
Topic: Image manipulation
Replies: 7
Views: 269

Re: Image manipulation

...I'm trying to write a piece of code to perform some image manipulation - specifically, to mathematically subtract one image from another... I can't see a ready made function for this in Gambas. So you would either have to cycle through the 2 dimensional array for each of the 2 images, and subtra...
by stevedee
Wednesday 28th February 2018 8:42am
Forum: General
Topic: Send command "string" over tcp/ip
Replies: 15
Views: 643

Re: Send command "string" over tcp/ip

...I started the app and started terminal , used the command : netstat -at , my specified port did not appear at all no communication... Please put a breakpoint at the line:- If ClientSocket.Status > Net.Inactive Then ...and then run the code in the Gambas IDE. If the code does not stop at the brea...
by stevedee
Wednesday 28th February 2018 8:27am
Forum: General
Topic: Quote character in mysql search string
Replies: 5
Views: 210

Re: Quote character in mysql search string

OK, so it looks like your quoting problem is with SQL not Gambas (i.e. you need to quote to suit SQL rules).

Take a look at this post and let us know if it helps: https://stackoverflow.com/questions/676 ... ophe-in-it
by stevedee
Tuesday 27th February 2018 5:45pm
Forum: General
Topic: Quote character in mysql search string
Replies: 5
Views: 210

Re: Quote character in mysql search string

I hate this quoting problem. It comes up from time to time and I never seem to remember what I did last time. In an example where I was running a Gimp script I did this:- strExt = Quote("*.[jJ][pP][gG]") strCommand = "cd " & DirView1.Current & " && gimp -i -b '(scale-batch " & strExt & ")' -b '(gimp...
by stevedee
Sunday 25th February 2018 10:10am
Forum: General
Topic: Send command "string" over tcp/ip
Replies: 15
Views: 643

Re: Send command "string" over tcp/ip

jornmo wrote:
Sunday 25th February 2018 8:17am
...Its the javascript on this site that takes care of the syntax highlighting...
Thanks Jornmo, don't waste any time on it, I was just curious. I couldn't see any non-printing characters or anything unusual that might cause it within the text block.