FBImage static Win/Lin 32/64-bit
Re: FBImage static Win/Lin 32/64-bit
Instead, it would be best if dpitch would be declared as LONG.
-
- Posts: 8609
- Joined: May 28, 2005 3:28
- Contact:
Re: FBImage static Win/Lin 32/64-bit
no don't mix native integer with long :-(fxm wrote:Instead, it would be best if dpitch would be declared as LONG.
Joshy
Re: FBImage static Win/Lin 32/64-bit
Then you'll have to stick with FBC <= 1.07.3.D.J.Peters wrote:no don't mix native integer with long :-(
From version 1.08.0 it's either LONG or LONGINT as per "ScreenInfo/ImageInfo" in the Doc's. ;-)
Re: FBImage static Win/Lin 32/64-bit
and also "ScreeenControl".
Re: FBImage static Win/Lin 32/64-bit
How come this library is not included with the FB distribution? Or better yet, built into the FB graphics library? It's too useful not to have it available.
Re: FBImage static Win/Lin 32/64-bit
We are working on that. This one, FbSound, and a couple others. The next release will probably have them all included as static libraries.
-
- Posts: 8609
- Joined: May 28, 2005 3:28
- Contact:
Re: FBImage static Win/Lin 32/64-bit
For a fun project I needed writing retro RGB and RGBA TGA files so I added it to FBImage.
(see first post for download)
Joshy
(see first post for download)
Joshy
Code: Select all
function SaveTGAFile(byval img as any ptr, byval filename as const zstring ptr, byval saveAlpha as boolean) as boolean
Re: FBImage static Win/Lin 32/64-bit
Hello,
I tried to save an 8 bit gfx buffer (indexed pallete) with your library.
But for some reason the palette is geting trashed.
When looking at the png details with Irfanview (press i) I see it's using zip + grayscale compression.
Is there a way to get this working?
I tried to save an 8 bit gfx buffer (indexed pallete) with your library.
But for some reason the palette is geting trashed.
When looking at the png details with Irfanview (press i) I see it's using zip + grayscale compression.
Is there a way to get this working?
Code: Select all
#INCLUDE "vbcompat.bi"
#include "fbgfx.bi"
#include once "FBImage.bi"
sub setpalette
dim as string rgbval
dim as integer r,g,b
dim as string pal(0 to 15)={"000000","FFFFFF","68372B","70A4B2","6F3D86","588D43","352879","B8C76F","6F4F25","433900","9A6759","444444","6C6C6C","9AD284","6C5EB5","959595"}
for v as integer=0 to 15
rgbval=pal(v)
r=val("&h" & mid(rgbval,1,2))
g=val("&h" & mid(rgbval,3,2))
b=val("&h" & mid(rgbval,5,2))
palette v,r,g,b
next
end sub
screenres(160,100,8)',,fb.GFX_NULL)
setpalette
Dim bitmap As Any Ptr = ImageCreate(160,10)
for x as integer=0 to 16-1
Line bitmap,(x*10,0)-(x*10+9, 9), x, bf
Line (x*10,0)-(x*10+9, 9), x, bf
next
bsave "test.bmp",bitmap
SavePNGFile(bitmap,"test.png") ' <- default save with alpha channel = false
imagedestroy bitmap
sleep