Search found 265 matches
- Friday 19th January 2024 12:10pm
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2768
Re: Convert image to byte array - what am I doing wrong.
...having the " BMP " format image file, if you need to send to your printer the individual byte-data constituting the bitmap's pixel map structure, here is how to simply extract them from the file: Public Sub Form_Open() Dim s As String Dim w, h As Integer Dim bit, saltus As Short s = Fil...
- Friday 19th January 2024 12:58am
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2768
Re: Convert image to byte array - what am I doing wrong.
But if you are loading from file name no need to use Image.class i guess you can just load the file directly? Maybe like this... Public Sub Form_Open() Dim path As String Dim bb As Byte[] path = "/path/of/image/file" ' ...I get the coveted byte array: bb = Byte[].FromString(File.Load(path...
- Friday 19th January 2024 12:25am
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2768
- Thursday 18th January 2024 11:32pm
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2768
Re: Convert image to byte array - what am I doing wrong.
Probably you have to update your Gambas.
See:
https://gitlab.com/gambas/gambas/-/comm ... b1e4c46e08
- Thursday 18th January 2024 3:49pm
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2768
Re: Convert image to byte array - what am I doing wrong.
However, I would take this smoother path.... Public Sub Form_Open() Dim path As String Dim im As Image Dim bb As Byte[] path = "/path/of/image/file" im = Image.load(path) ' ...I get the coveted byte array: bb = Byte[].FromString(im.ToString(File.Ext(path), 100)) ' Test...... PictureBox1.Im...
- Thursday 18th January 2024 3:13pm
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2768
Re: Convert image to byte array - what am I doing wrong.
The " Memory Stream " resource is used to read, but-- specifically --to write data a reserved memory area, pointed to by a " Pointer ". Therefore, the " Memory Stream " resource must be passed the " .Data " Property of the " Image " Class, as that on...
- Tuesday 9th January 2024 6:39pm
- Forum: Beginners
- Topic: How to check if two files are identical
- Replies: 4
- Views: 2670
Re: How to check if two files are identical
The native Comp() function may also be fine, , loading the two files with the "File.Save()" Method. http://gambaswiki.org/wiki/lang/comp If you want to check the equality of two files using the external functions of the libgio API: https://www.gambas-it.org/wiki/index.php/Controllare_l%27u...
- Saturday 6th January 2024 11:30pm
- Forum: General
- Topic: ALSA Mixer control
- Replies: 9
- Views: 2142
Re: ALSA Mixer control
So far, I’ve found this ALSA program to test latency:
https://www.alsa-project.org/wiki/Test_latency.c
https://git.alsa-project.org/?p=alsa-li ... /latency.c;
https://www.alsa-project.org/wiki/Test_latency.c
https://git.alsa-project.org/?p=alsa-li ... /latency.c;
- Saturday 6th January 2024 11:01pm
- Forum: General
- Topic: ALSA Mixer control
- Replies: 9
- Views: 2142
- Saturday 6th January 2024 10:14pm
- Forum: General
- Topic: ALSA Mixer control
- Replies: 9
- Views: 2142
Re: ALSA Mixer control
As for "a function in the Gambas resources", where would I start on this and where would I look to rework the mixer level for latency (if possible)? In ALSA A.P.I.: https://www.alsa-project.org/alsa-doc/alsa-lib/mixer_8h.html https://www.alsa-project.org/alsa-doc/alsa-lib/group___simple_m...