FreeImage Userlib (open source project)
Community Forums/Showcase/FreeImage Userlib (open source project)
| ||
Hi all, I'm releasing the unfinished FreeImage Userlib for B+ this is obviously open source. What I would ask that any improvements and additions be emailed to me so that I can keep this Userlib up to date. The original Userlib will be v1.0 and I will add contributors names to the lib as and when they are implimented. Doc's and a more generic command send would be a start for anyone wishing to improve on this. The showcase entry is HERE! Have fun, and I hope it helps someone out. (or at least it's a start) |
| ||
I have a question for anyone that knows. According to the FreeImage T&C it *LOOKs* like it can be used in commercial projects (i.e. Blitz / Blitz3D & BlitzPlus ). Can someone who understands the terms and conditions tell me if I really *can* use this DLL in a commercial project without getting shot! |
| ||
Yes you can, you need to use the FreeImage Public License not the GNU license. http://freeimage.sourceforge.net/freeimage-license.txt |
| ||
Thanks! |
| ||
Thanks Snarty. Nice contribution. Anyone know if it supports alpha as is? |
| ||
Yup, it should do. :) |
| ||
Nice one! |
| ||
Is there any way to get this to run from Blitz3D? We seem a bit stuffed without LockedPixels! |
| ||
Yes, you could write to a bank then translate via WritePixelFast from the bank to the image :) (obviously will be quite a bit slower) |
| ||
Something like this should work (replacing the FIToBank in the B+ Version)FIImage\Pitch=(Ceil(FIImage\Width*4)/4)*4 ImageBank=CreateBank(FIImage\Height*FIImage\Pitch) FIToBank ImageBank,FIBITMAP,FIImage\Pitch,24,$FF0000,$FF00,$FF,0 LockBuffer ImageBuffer(FIImage\ImageLoc) For y=0 To FIImage\Height Yoff=y*FIImage\Pitch For x=0 To FIImage\Width WritePixelFast x,y,PeekInt(ImageBank,Yoff+(x*4)) Next Next UnlockBuffer ImageBuffer(FIImage\ImageLoc) FreeBank ImageBank |