BMP to GIF Converter
BMP to GIF Converter
I'm looking for a small executable or DLL library I can use to convert BMP format images to GIF.. Anyone know of anything?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Hi Karbon,
I don't know if it really helps you, but Progi1984 has created a wrapper for FreeImage. You can find more information here:
http://www.purebasic.fr/english/viewtop ... c&start=30
I don't know if it really helps you, but Progi1984 has created a wrapper for FreeImage. You can find more information here:
http://www.purebasic.fr/english/viewtop ... c&start=30
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Aye, FreeImage is great and Progi has done a great job.
Code: Select all
IncludeFile "RW_FreeImage_Inc.pb"
dib = FreeImage_Load(#FIF_BMP, "bm1.bmp", #BMP_DEFAULT)
FreeImage_Save(#FIF_GIF, dib, "test.gif",0)
I may look like a mule, but I'm not a complete ass.
Thanks for the pointer to FreeImage.
Are there some GDI+ examples floating around for PB?
Are there some GDI+ examples floating around for PB?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
There are some excellent PB wrappers for the gdi+ library in these forums.
However, if saving to gif is all you are after......
However, if saving to gif is all you are after......
Code: Select all
#GDIPLUS_OK = 0
;-Structures.
Structure GdiplusStartupInput
GdiPlusVersion.l
*DebugEventCallback.DebugEventProc
SuppressBackgroundThread.l
SuppressExternalCodecs.l
EndStructure
;-Imports.
Import "gdiplus.lib"
GdiplusStartup(token, *input.GdiplusStartupInput, output)
GdiplusShutdown(token)
GdipCreateBitmapFromFile(filename.p-unicode, *bitmap)
GdipSaveImageToFile(image, filename.p-unicode, *clsidEncoder.CLSID, *encoderParams)
GdipDisposeImage(image)
EndImport
;First initialise gdi+.
input.GdiplusStartupInput
input\GdiPlusVersion = 1
GdiplusStartup(@token, @input, #Null)
;Was the initialisation successful?
If token
If GdipCreateBitmapFromFile("bm1.bmp", @image) = #GDIPLUS_OK
GdipSaveImageToFile(image, "test.gif", ?clsid_giff, 0)
GdipDisposeImage(image)
EndIf
;Tidy up.
GdiplusShutdown(token)
EndIf
End
;CLSID for the gdi+ gif encoder.
DataSection
clsid_giff:
Data.l $557CF402
Data.w $1A04, $11D3
Data.b $9A, $73, $00, $00, $F8, $1E, $F3, $2E
EndDataSection
I may look like a mule, but I'm not a complete ass.
Thanks!
I can't get FreeImage to create a gif.. I can change FIF_GIF to FIF_JPEG (or any other format) and it works great. If I use GIF it just creates a 4k blank file.
I'm using Progi's wrapper and it looks to be up to date..
I can't get FreeImage to create a gif.. I can change FIF_GIF to FIF_JPEG (or any other format) and it works great. If I use GIF it just creates a 4k blank file.
I'm using Progi's wrapper and it looks to be up to date..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Oh, and FreeImage_IsPluginEnabled(#FIF_GIF) does return 1Karbon wrote:Thanks!
I can't get FreeImage to create a gif.. I can change FIF_GIF to FIF_JPEG (or any other format) and it works great. If I use GIF it just creates a 4k blank file.
I'm using Progi's wrapper and it looks to be up to date..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
The exact same source BMP image saves as any other format but GIF just by changing FIF_GIF to FIF_<whatever>
Very strange!
Very strange!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Ah, it works if I first convert the BMP to an 8 bit BMP.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net