3 of 9 barcode include for FreeBasic

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

3 of 9 barcode include for FreeBasic

Post by Pim Scheffers »

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
Moderator
Posts: 1733
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3 of 9 barcode include for FreeBasic

Post by paul doe »

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: 54
Joined: Jun 29, 2014 17:15

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

Post by Pim Scheffers »

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: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

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

Post by coderJeff »

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