FreeBASIC Extended Library

New to FreeBASIC? Post your questions here.
ivory348
Posts: 49
Joined: Dec 14, 2019 12:07
Location: Groningen, Netherlands

FreeBASIC Extended Library

Postby ivory348 » Jan 23, 2020 22:32

Re the FreeBASIC Extended Library. Does it still exist / can it be downloaded anywhere? The reason why I am asking this, is that I would like to know how to incorporate an image to be displayed using freeBasic.. Please advise. Patrick.
badidea
Posts: 1784
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: FreeBASIC Extended Library

Postby badidea » Jan 23, 2020 22:41

ivory348 wrote:Re the FreeBASIC Extended Library. Does it still exist / can it be downloaded anywhere? The reason why I am asking this, is that I would like to know how to incorporate an image to be displayed using freeBasic.. Please advise. Patrick.

The wiki links to this: https://code.google.com/archive/p/fb-ex ... /downloads
But there is also a recent fork: viewtopic.php?f=8&t=27876

What kind of image do you want to display?
ivory348
Posts: 49
Joined: Dec 14, 2019 12:07
Location: Groningen, Netherlands

Re: FreeBASIC Extended Library

Postby ivory348 » Jan 23, 2020 23:16

badidea wrote:<snipped> What kind of image do you want to display?


I understand that not all extensions are OK because use might be restricted by propriety rights.

There are several links to be found on the Net to the extended library, but all that I found led to dead ends.

I would like to use a *jpg so I could work with paint.net

Patrick.
badidea
Posts: 1784
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: FreeBASIC Extended Library

Postby badidea » Jan 23, 2020 23:26

Then have a look at this project/library as well: viewtopic.php?f=14&t=24105&hilit=fbImage
D.J.Peters
Posts: 7949
Joined: May 28, 2005 3:28

Re: FreeBASIC Extended Library

Postby D.J.Peters » Jan 24, 2020 4:03

@ivory348 I would prefer PNG for FreeBASIC your image app.
JPG isn't a lossless compression you know ?
PNG is lossless compression and supports an alpha chanell also !

FBImage supports reading and writing of PNG including optional the alpha chanell.

Joshy
ivory348
Posts: 49
Joined: Dec 14, 2019 12:07
Location: Groningen, Netherlands

Re: FreeBASIC Extended Library

Postby ivory348 » Jan 24, 2020 6:06

badidea wrote:Then have a look at this project/library as well: https://freebasic.net/forum/viewtopic.p ... it=fbImage


FBImage.bi seems to be the basis of the solution, it isn't to be found on the Net.
ivory348
Posts: 49
Joined: Dec 14, 2019 12:07
Location: Groningen, Netherlands

Re: FreeBASIC Extended Library

Postby ivory348 » Jan 24, 2020 8:59

D.J.Peters wrote:@ivory348 <snipped>

FBImage supports reading and writing of PNG including optional the alpha chanell.

Joshy


Hi, I cannot find FBImage on the Net. Is the file still available somewhere? Patrick.
paul doe
Posts: 1068
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FreeBASIC Extended Library

Postby paul doe » Jan 24, 2020 9:58

ivory348 wrote:...
Hi, I cannot find FBImage on the Net. Is the file still available somewhere? Patrick.

The above posts contain a direct link to it (complete with a small example):

D.J.Peters wrote:I created a tiny FBImage lib it's a small subset of library SOIL.

download: FBImage.zip (Windows/Linux 32/64-bit) Thu Nov 02, 2017
(source code as Code::Block project are included)

You can save PNG and load BMP, TGA, DDS, JPG and PNG images as FBImage from file or memory but not interlaced "Progressive" JPEG.

(if you need the dimension of any loaded image use ImageInfo img,w,h)

test_alpha.bas

Code: Select all

#include once "FBImage.bi"

' load RGBA png (with alpha channel)

chdir exepath()

screenres 640,480,32 ' RGBA

line (0,0)-step(639,479),&HFF0000FF,BF

var img = LoadRGBAFile("lights_alpha.png")

put (0,0),img,ALPHA

sleep
ImageDestroy img

Return to “Beginners”

Who is online

Users browsing this forum: MSN [Bot] and 1 guest