I'm using FreeImage 3.7.0 DLL with Borland C++ Bulider 6.0.
My test steps:
1 - Create red.gif in MS Paint: (1024 x 768 px) filled with red color;
2 - img = FreeImage_Load(FIF_GIF, "red.gif");
3 - FreeImage_Save(FIF_BMP, img, "red.bmp");
4 - red.bmp is crazy!!!
1 - Saving the image in other formats:
FIBITMAP *img = FreeImage_Load(FIF_GIF, "red.gif");
if (img) {
FreeImage_Save(FIF_BMP, img, "red.bmp");
FreeImage_Save(FIF_JPEG, img, "red.jpg");
FreeImage_Save(FIF_PNG, img, "red.png");
FreeImage_Unload(img);
}
All generated images are damaged...
2 - Create an BMP red image and saving as GIF:
red.gif is ok!
3 - Loading red.gif (generated with FreeImage) an saving in others formats:
FIBITMAP *img = FreeImage_Load(FIF_GIF, "red.gif");
if (img) {
FreeImage_Save(FIF_BMP, img, "red.bmp");
FreeImage_Save(FIF_JPEG, img, "red.jpg");
FreeImage_Save(FIF_PNG, img, "red.png");
FreeImage_Unload(img);
}
Same result of test 1...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your bmp looks as if there's something wrong with the pitch. With default options it works works fine, so my suspicion is that you do something more than just load + save.
Floris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm using FreeImage 3.7.0 DLL with Borland C++ Bulider 6.0.
My test steps:
1 - Create red.gif in MS Paint: (1024 x 768 px) filled with red color;
2 - img = FreeImage_Load(FIF_GIF, "red.gif");
3 - FreeImage_Save(FIF_BMP, img, "red.bmp");
4 - red.bmp is crazy!!!
Test files:
http://intranet.taotronics.com.br:8001/red.gif
http://intranet.taotronics.com.br:8001/red.bmp
Any idea?
New tests:
1 - Saving the image in other formats:
FIBITMAP *img = FreeImage_Load(FIF_GIF, "red.gif");
if (img) {
FreeImage_Save(FIF_BMP, img, "red.bmp");
FreeImage_Save(FIF_JPEG, img, "red.jpg");
FreeImage_Save(FIF_PNG, img, "red.png");
FreeImage_Unload(img);
}
All generated images are damaged...
2 - Create an BMP red image and saving as GIF:
red.gif is ok!
3 - Loading red.gif (generated with FreeImage) an saving in others formats:
FIBITMAP *img = FreeImage_Load(FIF_GIF, "red.gif");
if (img) {
FreeImage_Save(FIF_BMP, img, "red.bmp");
FreeImage_Save(FIF_JPEG, img, "red.jpg");
FreeImage_Save(FIF_PNG, img, "red.png");
FreeImage_Unload(img);
}
Same result of test 1...
I've tested the loading of your GIF file and the saving to BMP (with default options) and it works OK for me ...
Herv
Your bmp looks as if there's something wrong with the pitch. With default options it works works fine, so my suspicion is that you do something more than just load + save.
Floris
My test program has only these two lines...
Which the compiler / environment that you are using?