3 of 9 barcode include for FreeBasic

User projects written in or related to FreeBASIC.
Pim Scheffers
Posts: 46
Joined: Jun 29, 2014 17:15

3 of 9 barcode include for FreeBasic

Postby Pim Scheffers » Mar 13, 2019 9:53

Hello,

I created a 3 of 9 bar-code include file 32 / 64 bit compatible.
This include file lets you plot bar-codes on a FreeBasic image buffer.

All text will be automatically converted to upper case and only the following character set is available:
" ","$","%","*","+","-",".","/"
"0","1","2","3","4","5","6","7","8","9"
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_"

A demo program is also supplied:

Function parameters: fb_barcode(dst_img as fb.image ptr, x_pos as integer, y_pos as integer, txt as string, img_h as integer, col as ulong, mult as integer)

The width of a bar-char is 16 pixels, the height can me set manually and the multiplier variable scales the barcode.
You can test the codes with any bar-code scanner app on your phone.

enjoy: :-)
https://1drv.ms/u/s!ArvnuLSK5obmgq1S6an1RthnBqZheQ
Last edited by Pim Scheffers on Mar 13, 2019 16:13, edited 2 times in total.
paul doe
Posts: 1068
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3 of 9 barcode include for FreeBasic

Postby paul doe » Mar 13, 2019 10:44

Nice little tool. A little suggestion: put the actual code below the bars. This is just in case the code can't be read by the barcode reader for some reason (in which case you'll need to enter it manually).
Pim Scheffers
Posts: 46
Joined: Jun 29, 2014 17:15

Re: 3 of 9 barcode include for FreeBasic (Update)

Postby Pim Scheffers » Mar 13, 2019 16:13

Small update above! (multiplier still present in height parameter of imagecreate)

@Paul, the application where I use this sub does add text however that is done with a font render tool.
Should be easy to add for anybody who wants to use this tool.
coderJeff
Site Admin
Posts: 3159
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: 3 of 9 barcode include for FreeBasic (Update)

Postby coderJeff » Mar 16, 2019 20:31

Hi Pim. I edited your subject title. When it's changed to just "Update" we lose the original subject on the forum summary page.

Return to “Projects”

Who is online

Users browsing this forum: MSN [Bot] and 2 guests